ma.
isarray
Test whether input is an instance of MaskedArray.
This function returns True if x is an instance of MaskedArray and returns False otherwise. Any object is accepted as input.
Object to test.
True if x is a MaskedArray.
See also
isMA
Alias to isMaskedArray.
Examples
>>> import numpy.ma as ma >>> a = np.eye(3, 3) >>> a array([[ 1., 0., 0.], [ 0., 1., 0.], [ 0., 0., 1.]]) >>> m = ma.masked_values(a, 0) >>> m masked_array( data=[[1.0, --, --], [--, 1.0, --], [--, --, 1.0]], mask=[[False, True, True], [ True, False, True], [ True, True, False]], fill_value=0.0) >>> ma.isMaskedArray(a) False >>> ma.isMaskedArray(m) True >>> ma.isMaskedArray([0, 1, 2]) False