cf.Data.binary_mask

Data.binary_mask()[source]

Return a binary missing data mask of the data array.

The binary mask’s data array comprises dimensionless 8-bit integers and has 0 where the data array has missing data and 1 otherwise.

Returns :
out : Data

The binary mask.

Examples

>>> print d.mask.array
[[ True False  True False]]
>>> b = d.binary_mask().array
>>> print b
[[0 1 0 1]]

Previous topic

cf.Data.asreftime

Next topic

cf.Data.chunk

This Page