sort¶
- xarray_einstats.sort(da, dim, kind=None, stable=None, **kwargs)[source]¶
Sort along dimension using DataArray values.
Wrapper around
numpy.sort
The returned DataArray has the same shape and dimensions as the original one but the coordinate values along dim no longer make sense given each subset along the other dimensions can have a different order along dim so they are removed.
- Parameters:
- da
xarray.DataArray
Input data
- dimhashable
Dimension along which to sort using dataarray values, not coordinates.
- kind
str
, optional - stablebool, optional
- **kwargs
Passed to
xarray.apply_ufunc
- da
- Returns: