cf.DomainAxis.get_size

DomainAxis.get_size(default=ValueError())[source]

Return the size.

New in version (cfdm): 1.7.0

Parameters
default: optional

Return the value of the default parameter if the size has not been set.

If set to an Exception instance then it will be raised instead.

Returns

The size.

Examples

>>> d = cf.DomainAxis(size=50)
>>> d.has_size()
True
>>> d.get_size()
50
>>> d.set_size(100)
>>> d.get_size()
100
>>> d.del_size()
100
>>> d.has_size()
False
>>> print(d.del_size(None))
None