pyinterp.Binning1D#
- class pyinterp.Binning1D(x: Axis, range: Tuple[float, float] | None = None, dtype: dtype = dtype('float64'))[source]#
Bases:
object
Group a number of more or less continuous values into a smaller number of “bins” located on a vector.
- 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
Gets the bin centers for the X Axis of the grid.
Public Methods
clear
()Clears 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
()Gets the lower and upper range of the bins.
variable
([statistics])Gets the regular grid containing the calculated statistics.
Special Methods