xdas.ptp#

xdas.ptp(da, dim=None, **kwargs)[source]#

Compute the range of values along the specified dimension.

Parameters:
  • da (DataArray) – Input data.

  • dim (str, optional) – Dimension along which the range is computed. If None, the range of the flattened array is returned. Default is None.

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

Returns:

Range of values along the specified dimension (maximum - minimum). If dim is None, a single scalar value is returned; if dim is specified, the result has the same shape as the input data.

Return type:

scalar or DataArray