xdas.argmax#

xdas.argmax(da, dim=None, *, skipna=True, **kwargs)[source]#

Return the indices of the maximum values along an dimension.

Parameters:
  • da (DataArray) – Input data.

  • dim (str, optional) – Dimension along which the argmax operation is performed. If None, the argmax operation is applied to the flattened array. Default is None.

  • skipna (bool, optional) – Whether to exclude NaN values (True) or include them (False) in the computation. Default is True.

  • **kwargs – Additional keyword arguments passed to the NumPy function.

Returns:

Indices of the maximum values along the specified dimension. If dim is None, a single integer index is returned; if dim is specified, the result has the same shape as the input data.

Return type:

int or DataArray