-
-
Notifications
You must be signed in to change notification settings - Fork 12k
MAINT: Make assert_array_compare more generic. #11756
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
Conversation
numpy/testing/_private/utils.py
Outdated
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.
Would it be overkill to mock up an ndarray subclass for which this succeeds but the previous version fails for a test of the test?
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.
I thought about it, but didn't want to tie us into that behavior. Could add a comment.
jeffyancey
left a comment
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.
Since we are removing the != True reference in the comment on line 704, shouldn't we update the comment?
689d0a3 to
06eb262
Compare
|
@tylerjereddy Added a comment and made the changes more conservative. |
tylerjereddy
left a comment
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.
I found a typo but everything is green and seems sensible beyond that
numpy/testing/_private/utils.py
Outdated
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.
typo -> compatibility
Use np.all instead of the *.all method to be a bit more robust against bad subclasses of ndarray that may change the behavior of the method. Closes numpy#11743.
06eb262 to
78efe63
Compare
Use np.any instead of method to be a bit more robust against bad
subclassing of ndarray.
Closes #11743.