-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Fix various bugs in np.ma.where #8647
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
29d0340
to
c9607e7
Compare
Fixes numpy#8600 and numpy#8599 Also makes np.ma.masked work with structured dtypes.
c9607e7
to
6349ac0
Compare
Sorry about that, unexpectedly caused some tests to fail when trying to clean something up in the rebase |
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.
This all looks good. For subclasses, one now has the problem as np.where
itself doesn't do subclasses correctly, but that is obviously outside of scope for this PR.
Although that would then lead to confusion when So if |
Do you want me to revert that last commit then? |
@eric-wieser - I have no strong feelings about this. Overall, a well-written class with a good |
I think I can be convinced to keep this, in the case of something like a |
6349ac0
to
2d229ef
Compare
@mhvk: I rolled back that last commit - I think |
@mhvk: Tests all pass - good to merge? |
Great! Merging... |
This fixes #8599, #8600,
andand #5826np.ma.where
not preserving subclassesThis is an accidental reimplementation of #5827