cfdm.Domain.get_data_axes

Domain.get_data_axes(*identity, default=ValueError(), **filter_kwargs)[source]

Gets the keys of the axes spanned by the construct data.

Specifically, returns the keys of the domain axis constructs spanned by the data of a metadata construct.

New in version (cfdm): 1.7.0

Parameters
identity, filter_kwargs: optional

Select the unique construct returned by d.construct(*identity, **filter_kwargs). See construct for details.

New in version (cfdm): 1.10.0.0

default: optional

Return the value of the default parameter if the data axes have not been set.

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

filter_kwargs: optional

Keyword arguments as accepted by Constructs.filter that define additional construct selection criteria.

New in version (cfdm): 1.10.0.0

Returns
tuple

The keys of the domain axis constructs spanned by the data.

Examples

>>> d = cfdm.example_domain(0)
>>> d.get_data_axes('latitude')
('domainaxis0',)
>>> d.get_data_axes('time')
('domainaxis2',)
>>> d.has_data_axes()
True
>>> d.del_data_axes()
('domainaxis0', 'domainaxis1')
>>> d.has_data_axes()
False
>>> d.get_data_axes(default='no axes')
'no axes'