cf.CellMeasure.masked_invalid¶
-
CellMeasure.
masked_invalid
(*args, **kwargs)[source]¶ Mask the array where invalid values occur (NaN or inf).
See also
- Parameters
- Returns
CellMeasure
orNone
The construct with masked values, or
None
if the operation was in-place.
Examples
>>> print(f.array) [0 1 2] >>> print(g.array) [0 2 0] >>> h = f / g >>> print(h.array) [nan 0.5 inf] >>> i = h.masked_invalid() >>> print(i.array) [-- 0.5 --]