get_dimension_number#

rojak.core.derivatives.get_dimension_number(name, data_array)[source]#

Get the axis position of a named dimension in a DataArray

Parameters:
  • name (str) – Name of the dimension to look up

  • data_array (DataArray) – Array to look up the dimension’s position in

Returns:

Position of name in data_array.dims

Raises:

ValueError – If name is not a dimension of data_array

Return type:

int