-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
ENH: Add warning in median, percentile and quantile when array is MaskedArray #15180
base: main
Are you sure you want to change the base?
Conversation
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'm not a huge fan of this approach - numpy.ma
is supposed to be built on top of numpy, not integrated into it. Perhaps practicality beats purity here though.
Another approach would be for MaskedArray to use |
Even if that implementation does nothing but warn that the mask is not supported. Problem is, |
It dispatches on all functions, but we can defer on ones we do not wish to override. The example below this link shows that design pattern |
It doesn't, that returns |
There was some discussion of making a new masked array implementation that would use the |
Here is the prototype https://github.com/ahaldane/ndarray_ducktypes/blob/master/MaskedArray.py |
This is one of those cases where the |
Probably the best option is to make a new masked array implementation as in prototype and add warnings/implementation there. |
Closes #14716