Repository navigation
Add correction argument to jnp.nanvar and jnp.nanstd - #41696
Merged
copybara-service[bot] merged 1 commit intoOct 19, 2026
Merged
Conversation
jakevdp
requested changes
Oct 16, 2026
jayzuccarelli
force-pushed
the
nanvar-correction
branch
from
October 16, 2026 17:42
ad9b4a2 to
df6af04
Compare
jakevdp
requested changes
Oct 16, 2026
jayzuccarelli
force-pushed
the
nanvar-correction
branch
from
October 16, 2026 17:53
df6af04 to
91abea9
Compare
jakevdp
requested changes
Oct 16, 2026
jakevdp
left a comment
Collaborator
There was a problem hiding this comment.
Looks pretty good! Just one more minor comment
Collaborator
|
I think the failures here are unrelated. Could you please squash your changes into a single commit and rebase on the updated main branch? Thanks! |
NumPy 2.0 added `correction` to `nanvar`/`nanstd` as an alias for `ddof`, same as `var`/`std`. This mirrors the existing `jnp.var`/`jnp.std` handling (jax-ml#21088): the public functions resolve `correction`/`ddof` and raise if both are given, and the jitted work moves into `_nanvar`/`_nanstd` so an explicit `ddof=0` isn't traced. Also drops `nanvar`/`nanstd` from the known-missing list in `testWrappedSignaturesMatch`, and adds the `mean` parameter the stubs were missing.
jayzuccarelli
force-pushed
the
nanvar-correction
branch
from
October 19, 2026 17:42
2742c54 to
d25d98a
Compare
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.
NumPy 2.0 added
correctiontonanvar/nanstdas an alias forddof, same asvar/std. This mirrors the existingjnp.var/jnp.stdhandling (#21088): the public functions resolvecorrection/ddofand raise if both are given, and the jitted work moves into_nanvar/_nanstdso an explicitddof=0isn't traced.Also drops
nanvar/nanstdfrom the known-missing list intestWrappedSignaturesMatch, and adds themeanparameter the stubs were missing.