scipp.bin¶
- scipp.bin(x, *, edges=None, groups=None, erase=None)¶
Create binned data by binning input along all dimensions given by edges.
This does not histogram the data, each output bin will contain a “list” of input values.
At least one argument of
edges
andgroups
is required.- Parameters
x (scipp._scipp.core.DataArray) – Input data.
edges (Optional[Sequence[scipp._scipp.core.Variable]]) – Bin edges, one per dimension to bin in.
groups (Optional[Sequence[scipp._scipp.core.Variable]]) – Keys to group input by one per dimension to group in.
erase (Optional[Sequence[scipp._scipp.core.Variable]]) – Dimension labels to remove from output.
- Returns
Binned
x
.- Seealso
scipp.histogram()
for histogramming data,scipp.bins()
for creating binned data based on explicitly given index ranges.- Return type