Closed
Description
Is this change intentional? I cannot tell.
As a result of this change, when someone pass in plain array and then try to grab the .mask
, it has ndim=0
and the shape no longer matches the input, causing some downstream assumptions to break.
numpy 1.23.5
>>> import numpy as np
>>> np.ma.masked_invalid([1,2,3]) # Same if I pass in np.array([1,2,3])
masked_array(data=[1, 2, 3],
mask=[False, False, False],
fill_value=999999)
numpy 1.24.0rc1
>>> import numpy as np
>>> np.ma.masked_invalid([1,2,3]) # Same if I pass in np.array([1,2,3])
masked_array(data=[1, 2, 3],
mask=False,
fill_value=999999)