xoa.cf.CFSpecs.get_dim_types

CFSpecs.get_dim_types(da, unknown=None, asdict=False)[source]

Get a tuple of the dimension types of an array

Parameters
  • da (xarray.DataArray or tuple(str)) – Data array or tuple of dimensions

  • unknown – Value to assign when type is unknown

  • asdict (bool) –

Returns

tuple, dict – Tuple of dimension types and of length da.ndim. A dimension type is either a letter or the unkown value when the inference of type has failed. If asdict is True, a dict is returned instead, (dim, dim_type) as key-value pairs.

See also

get_dim_type