scipp.issorted(x, dim, order='ascending')#

Check if the values of a variable are sorted.

  • If order is ‘ascending’, check if values are non-decreasing along dim.

  • If order is ‘descending’, check if values are non-increasing along dim.

  • x (Variable) – Variable to check.

  • dim (str) – Dimension along which order is checked.

  • order (Optional[str], default: 'ascending') – Sorting order. Valid options are ‘ascending’ and ‘descending’. Default is ‘ascending’.


Union[Variable, DataArray, Dataset] – Variable containing one less dim, than the original variable with the corresponding boolean value for whether or not it was sorted along the given dim for the other dimensions.