cf.Data.del_units¶
-
Data.
del_units
(default=ValueError())[source]¶ Delete the units.
See also
- Parameters
- default: optional
Return the value of the default parameter if the units has not been set. If set to an
Exception
instance then it will be raised instead.
- Returns
str
The value of the deleted units.
Examples
>>> d = cf.Data(1, "m") >>> d.del_units() 'm' >>> d.Units <Units: > >>> d.del_units() Traceback (most recent call last): ... ValueError: Data has no units
>>> d = cf.Data(1, "days since 2000-1-1", calendar="noleap") >>> d.del_units() 'days since 2000-1-1' >>> d.Units <Units: noleap>