xoa.cf.CFCoordSpecs.get_dim_types
- CFCoordSpecs.get_dim_types(obj, unknown=None, asdict=False)[source]
Get a tuple of the dimension types of an array
- Parameters:
obj (xarray.DataArray, tuple(str), xarray.Dataset) – Data array, dataset or tuple of dimensions
unknown – Value to assign when type is unknown
asdict (bool) –
- Returns:
tuple, dict – Tuple of dimension types and of length
obj.ndim
. A dimension type is either a letter or theunkown
value when the inference of type has failed. Ifasdict
is True, a dict is returned instead,(dim, dim_type)
as key-value pairs.
See also