cf.Data.get_fill_value¶
-
Data.
get_fill_value
(default=ValueError())[source]¶ Return the missing data value.
New in version (cfdm): 1.7.0
See also
- Parameters
- default: optional
Return the value of the default parameter if the fill value has not been set.
If set to an
Exception
instance then it will be raised instead.
- Returns
The fill value.
Examples
>>> f.set_fill_value(-9999) >>> f.has_fill_value() True >>> f.get_fill_value() -9999 >>> print(f.del_fill_value()) -9999 >>> f.get_fill_value() ValueError: Can't get non-existent fill value >>> f.get_fill_value(10**10) 10000000000 >>> print(f.get_fill_value(None)) None >>> f.set_fill_value(None) >>> print(f.get_fill_value()) None >>> f.has_fill_value() False