-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
ENH: array comparison utils show calculations and indices of max errors #29395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
58a5820
to
a967767
Compare
Is the failing test maybe an instance of #29262 ? |
It looks like pypy segfaulted on your PR. I don't think it's the same issue you linked to. Definitely a real problem but probably unrelated to this PR and safe for you to ignore. Unfortunately the NumPy CI is sufficiently complicated that along with several heisenbugs bits and pieces regularly start failing for lots of reasons. Unless you're interested in helping out with a fix, it's usually safe to ignore. If you're unsure, just ask, and a maintainer should catch it if an error is real and it was ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pypy tests have segfaulted twice in the same spot now, so I think it's a real issue you're running into.
ping @mattip for pypy expertise.
violations. | ||
- Assertion errors raised by `assert_array_almost_equal_nulp` and | ||
`assert_array_max_ulp` (which have no verbose toggle) now show the indices of | ||
the maximum ULP difference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the doc build fails with an error:
source/release/notes-towncrier.rst:72: WARNING: Bullet list ends without a blank line; unexpected unindent.
Maybe look at how the bullet lists are formatted in other release notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking at other examples and adding a newline I still got the same error 🤷 . I just removed the bullets.
4c65fff
to
74ef2ba
Compare
74ef2ba
to
60c73f9
Compare
Not needed since e6b68e5
Noticed the extra dimension while adding the index of the max error to assert_array_XXX_nulp output
Noticed these while attempting to append more content to the expected message, upon which the partial values started causing the regex to stop matching.
Resolves numpy#28827 - Verbose assertion errors raised by testing.assert_allclose and testing.assert_array_XXX now show the calculation and the indices of the maximum absolute and relative differences among the violations. - Assertion errors raised by assert_array_almost_equal_nulp and assert_array_max_ulp, which have no verbose toggle, now show the indices of the maximum ULP difference. The main complexity adding this feature was that one could not 'simply' replace `max` with `argmax` due to masking: the absolute differences is calculated after masking out infs and nans, and the relative differences are additionally calculated after masking out zero denominators.
60c73f9
to
c3ababe
Compare
Resolves #28827
testing.assert_allclose
andtesting.assert_array_XXX
now show the calculation and the indices of the maximum absolute and relative differences among the violations.assert_array_almost_equal_nulp
andassert_array_max_ulp
, which have no verbose toggle, now show the indices of the maximum ULP difference.The main complexity adding this feature was that one could not 'simply' replace
max
withargmax
due to masking: the absolute differences is calculated after masking out infs and nans, and the relative differences are additionally calculated after masking out zero denominators.Notes to reviewer: