BUG: Fix MaskedArray.setitem by eric-wieser · Pull Request #8648 · numpy/numpy (original) (raw)
Backport of #8594.
Fixes #8510.
The root cause here is that np.ma.getdata does a conversion to np.ndarray that we don't want to happen.
This conversion in general is a bad idea, because when delegating to base numpy functions, it doesn't allow that function to do the correct conversion with extra information.