pyinterp.Binning1D#
- class pyinterp.Binning1D(x: Axis, range: tuple[float, float] | None = None, dtype: dtype | None = None)[source]#
Bases:
objectGroup continuous values into bins located on a vector.
Create a 1D binning structure that groups a number of more or less continuous values into a smaller number of “bins” located on a vector for statistical calculations.
- Parameters:
x – Definition of the bin centers for the X axis of the grid.
range – The lower and upper range of the bins. If not provided, range is simply
(x.min_value(), x.max_value()).dtype – Data type of the instance to create.
Note
The axe define the centers of the different bins where the statistics will be calculated.
Attributes
Get the bin centers for the X Axis of the grid.
Public Methods
clear()Clear the data inside each bin.
push(x, z[, weights])Push new samples into the defined bins.
push_delayed(x, z[, weights])Push new samples into the defined bins from dask array.
range()Get the lower and upper range of the bins.
variable([statistics])Get the regular grid containing the calculated statistics.
Special Methods