Use jax.Array consistently for typing - #192
Open
mscroggs wants to merge 11 commits into
Open
Conversation
samjmolyneux
reviewed
Aug 5, 2026
| @@ -158,8 +157,8 @@ def f_y(x_uy: dict[str, NDArray], theta_y: ModelParam) -> float | NDArray: | |||
| c_values = node_c.possible_values | |||
|
|
|||
| def _integrand( | |||
| s_q: float, xzl: dict[str, NDArray], model_params: dict[str, ModelParam] | |||
| ) -> float | NDArray: | |||
| s_q: float, xzl: dict[str, jax.Array], model_params: dict[str, ModelParam] | |||
Collaborator
There was a problem hiding this comment.
Suggested change
| s_q: float, xzl: dict[str, jax.Array], model_params: dict[str, ModelParam] | |
| s_q: float, xzl: dict[str, jax.Array], model_params: ModelParam |
Looking at it now, should all this model_params be define as ModelParam or equivalently dict[str, Jax.Array]?
Collaborator
Author
There was a problem hiding this comment.
There's still a few dict[str, ModelParam] types in this PR. I'm uncertain if they're what we want or not
Collaborator
Author
There was a problem hiding this comment.
I've opened #215 for this typing issue. Suggest we merge this then leave sorting out ModelParam typing for the future
Co-authored-by: Sam Molyneux <samjmolyneux@gmail.com>
mscroggs
commented
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #155