cf.DimensionCoordinate.binary_mask

DimensionCoordinate.binary_mask()[source]

Return a binary (0 and 1) missing data mask of the data array.

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

Returns:
out : Variable

The binary mask.

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

Previous topic

cf.DimensionCoordinate.asreftime

Next topic

cf.DimensionCoordinate.chunk

This Page