RegularBinning#

class zfit.data.RegularBinning(bins, start, stop, *, name)[source]#

Bases: HashableAxisMixin, Regular, ZfitBinning

__getitem__(i)#

Access a bin, using normal Python syntax for wraparound.

Return type:

int | str | tuple[float, float]

bin(index)#

Return the edges of the bins as a tuple for a continuous axis or the bin value for a non-continuous axis, when given an index.

Return type:

int | str | tuple[float, float]

property centers: ndarray[Any, dtype[Any]]#

An array of bin centers.

property extent: int#

Return number of bins including under- and overflow.

index(value)#

Return the fractional index(es) given a value (or values) on the axis.

Return type:

int

property label: str#

Get or set the label for the Regular axis

property name: str#

Get the name for the Regular axis

property size: int#

Return number of bins excluding under- and overflow.

property traits: Traits#

Get traits for the axis - read only properties of a specific axis.

value(index)#

Return the value(s) given an (fractional) index (or indices).

Return type:

float

property widths: ndarray[Any, dtype[Any]]#

An array of bin widths.