A CF-compliant earth science data analysis library
Data.
masked_invalid
Mask the array where invalid values occur (NaN or inf).
See also
where, numpy.ma.masked_invalid
where
numpy.ma.masked_invalid
bool
If True then do the operation in-place and return None.
None
Data
The masked data, or None if the operation was in-place.
Examples
>>> d = cf.Data([0, 1, 2]) >>> e = cf.Data([0, 2, 0]) >>> f = d / e >>> f <CF Data(3): [nan, 0.5, inf]> >>> f.masked_invalid() <CF Data(3): [--, 0.5, --]>