8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
a = np.ma.masked_array(np.array([], dtype=float, ndmin=3)) np.ma.median(a, axis=2)
fails with
IndexError: index -1 is out of bounds for axis 2 with size 0
As integer indexing of empty slices does not work. Normal median slices instead and returns the mean of an empty slice, so nan.
What should masked median return? a masked nan to somewhat match the normal median or an empty array again?
The text was updated successfully, but these errors were encountered:
This is also an error in 1.11.3, so not a regression. I want to release 1.12.1 soon, so may not include a fix for this if it isn't ready.
Sorry, something went wrong.
hm that is a regression in 1.11.2, it does work in 1.11.1 there it returns nan, like the normal median so thats probably how we should fix it.
BUG: fix ma.median for empty ndarrays
05aa44d
return nan as it did in 1.11 and same as normal median. closes numpygh-8703
0c2cde4
Merge pull request #8707 from juliantaylor/ma-median-empty-1.12
e50b4cb
backport ma.median fix gh-8703 to 1.12
Successfully merging a pull request may close this issue.
fails with
As integer indexing of empty slices does not work.
Normal median slices instead and returns the mean of an empty slice, so nan.
What should masked median return? a masked nan to somewhat match the normal median or an empty array again?
The text was updated successfully, but these errors were encountered: