get_axis_num

UnitsAwareDataArray.get_axis_num(dim: Hashable | Iterable[Hashable]) int | tuple[int, ...]

Return axis number(s) corresponding to dimension(s) in this array.

Parameters:

dim (str or iterable of str) – Dimension name(s) for which to lookup axes.

Returns:

Axis number or numbers corresponding to the given dimensions.

Return type:

int or tuple of int