Open
Description
Spot the odd one out:
np.array
defaults tocopy=True, subok=False
np.ma.array
defaults tocopy=False, subok=True
np.asarray
defaults tocopy=False, subok=False
np.ma.asarray
defaults tocopy=False, subok=False
np.asanyarray
defaults tocopy=False, subok=True
np.ma.asanyarray
defaults tocopy=False, subok=True
So as a result, np.ma.asanyarray
and np.ma.array
are exactly the same.
More confusingly, np.ma.asarray
is stricter than np.ma.array
, not less strict!
I don't know if there's any way we can fix this without breaking downstream code, but it seems like a poor design decision - and violates the expectation that np.ma.func
and np.func
are similar.