Skip to content

Conversation

mscroggs
Copy link
Collaborator

Resolves #36

@mscroggs mscroggs mentioned this pull request May 1, 2025
@mscroggs mscroggs requested a review from willGraham01 May 1, 2025 06:58
Copy link
Collaborator

@willGraham01 willGraham01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nothing warranting functional changes. Though some questions about jax vs numpy - don't worry about addressing here but if you agree I'll open an issue for us so we don't forget to address the jax.numpy <- numpy issue later.

if self.value is None:
msg = "Cannot sample an undetermined parameter node."
raise ValueError(msg)
return np.full(samples, self.value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to return a jax.numpy.full here? I guess right now it's OK as a numpy return since that's what our other algorithms are returning too, but we should probably move to using jax.numpy everywhere for future proofing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should open an issue for this I think. Currently, we have numpy arrays as return types which will need updating in a few places

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#44

@mscroggs mscroggs merged commit d2e87c7 into main May 1, 2025
5 checks passed
@mscroggs mscroggs deleted the mscroggs/parameter-node branch May 1, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add parameter node
2 participants