Mask the array where invalid values occur (NaN or inf).
Note that:
See also
Examples 1: |
---|
>>> g = f.mask_invalid()
Parameters: |
|
---|---|
Returns: | out : cf.CellMeasure |
Examples: |
>>> print f.array
[ 0. 1.]
>>> print g.array
[ 1. 2.]
>>> old = cf.Data.seterr('ignore')
>>> h = g/f
>>> print h.array
[ inf 2.]
>>> h.mask_invalid(i=True)
>>> print h.array
[-- 2.]
>>> h = g**12345
>>> print h.array
[ 1. inf]
>>> h = h.mask_invalid()
>>> print h.array
[1. --]
>>> old = cf.Data.seterr('raise')
>>> old = cf.Data.mask_fpe(True)
>>> print (g/f).array
[ -- 2]
>>> print (g**12345).array
[1. -- ]