8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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?