SciPy

numpy.ma.MaskedArray.shrink_mask

method

MaskedArray.shrink_mask(self)[source]

Reduce a mask to nomask when possible.

Parameters:
None
Returns:
None

Examples

>>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4)
>>> x.mask
array([[False, False],
       [False, False]])
>>> x.shrink_mask()
>>> x.mask
False

Previous topic

numpy.ma.MaskedArray.unshare_mask

Next topic

numpy.ma.MaskedArray.get_fill_value