cfdm.Data.mask

Data.mask

The Boolean missing data mask of the data array.

The Boolean mask has True where the data array has missing data and False otherwise.

See also

masked_values

Returns
Data

The Boolean mask as data.

Examples

>>> d = cfdm.Data(numpy.ma.array(
...     [[280.0,   -99,   -99,   -99],
...      [281.0, 279.0, 278.0, 279.5]],
...     mask=[[0, 1, 1, 1], [0, 0, 0, 0]]
... ))
>>> d
<Data(2, 4): [[280.0, ..., 279.5]]>
>>> print(d.array)
[[280.0    --    --    --]
 [281.0 279.0 278.0 279.5]]
>>> d.mask
<Data(2, 4): [[False, ..., False]]>
>>> print(d.mask.array)
[[False  True  True  True]
 [False False False False]]