scipp.binning.make_binned#

scipp.binning.make_binned(x, *, edges=None, groups=None, erase=None)#

Create binned data by binning input along all dimensions given by edges or groups.

Usually scipp.bin() or scipp.group() should be preferred, unless the more precise control over which dimensions should be erased is required, or unless grouping and binning at the same time is required.

This does not histogram the data, each output bin will contain a “list” of input values.

At least one argument of edges and groups is required.

If the input is binned and certain bins are masked then changing the binning will apply the masks, i.e., masked bins are treated as empty.

Parameters
Returns

DataArray – Binned x.

See also

scipp.hist

For histogramming data.

scipp.bin

Recommended interface for binning data.

scipp.group

Recommended interface for grouping data.

scipp.bins

For creating binned data based on explicitly given index ranges.