scipp.rebin

scipp.rebin(x, dim, bins)

Rebin a dimension of a data array or dataset.

The input must contain bin edges for the given dimension dim.

Parameters
Raises

If data cannot be rebinned, e.g., if the existing coordinate is not a bin-edge coordinate.

Returns

Data rebinned according to the new bin edges.

Return type

VariableLike