Mask the array where invalid values occur (NaNs or infs).
Note that:
Returns : | out : cf.Data |
---|
See also
Examples
>>> d = cf.Data([0., 1])
>>> e = cf.Data([1., 2])
>>> old = cf.Data.seterr('ignore')
>>> f = e/d
>>> f
<CF Data: [inf, 2.0] >
>>> f.mask_invalid()
>>> f
<CF Data: [--, 2.0] >
>>> f=e**12345
>>> f
<CF Data: [1.0, inf] >
>>> f.mask_invalid()
>>> f
<CF Data: [1.0, --] >
>>> old = cf.Data.seterr('raise')
>>> old = cf.Data.mask_fpe(True)
>>> e/d
<CF Data: [--, 2.0] >
>>> e**12345
<CF Data: [1.0, --] >