cf.Data.set_units

Data.set_units(value)[source]

Set the units.

Parameters
value: str

The new units.

Returns

None

Examples

>>> d.set_units('watt')
>>> d.get_units()
'watt'
>>> d.del_units()
>>> d.get_units()
ValueError: Can't get non-existent units
>>> print(d.get_units(None))
None