boost_histogram#

boost_histogram.axis#

class boost_histogram.axis.ArrayTuple(iterable=(), /)#

Bases: tuple

broadcast() Self#

The arrays in this tuple will be compressed if possible to save memory. Use this method to broadcast them out into their full memory representation.

class boost_histogram.axis.AxesTuple(_iterable: Iterable[Axis])#

Bases: tuple

bin(*indexes: float) tuple[float, ...]#

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.

property centers: ArrayTuple#
property edges: ArrayTuple#
property extent: tuple[int, ...]#
index(*values: float) tuple[int, ...]#

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

property size: tuple[int, ...]#
value(*indexes: float) tuple[float, ...]#

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

property widths: ArrayTuple#
class boost_histogram.axis.Axis(ax: Any, metadata: dict[str, Any] | None, __dict__: dict[str, Any] | None)#

Bases: object

bin(index: float) int | str | tuple[float, float]#

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.

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

An array of bin centers.

property edges: ndarray[tuple[Any, ...], dtype[Any]]#
property extent: int#

Return number of bins including under- and overflow.

index(value: float | str) int#

Return the fractional index(es) given a value (or values) on the 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: float) float#

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

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

An array of bin widths.

class boost_histogram.axis.Boolean(*, metadata: Any = None, __dict__: dict[str, Any] | None = None)#

Bases: Axis

class boost_histogram.axis.IntCategory(categories: Iterable[int], *, metadata: Any = None, growth: bool = False, overflow: bool = True, __dict__: dict[str, Any] | None = None)#

Bases: BaseCategory

class boost_histogram.axis.Integer(start: int, stop: int, *, metadata: Any = None, underflow: bool = True, overflow: bool = True, growth: bool = False, circular: bool = False, __dict__: dict[str, Any] | None = None)#

Bases: Axis

class boost_histogram.axis.Regular(bins: int, start: float, stop: float, *, metadata: Any = None, underflow: bool = True, overflow: bool = True, growth: bool = False, circular: bool = False, transform: AxisTransform | None = None, __dict__: dict[str, Any] | None = None)#

Bases: Axis

property transform: AxisTransform | None#
class boost_histogram.axis.StrCategory(categories: Iterable[str], *, metadata: Any = None, growth: bool = False, overflow: bool = True, __dict__: dict[str, Any] | None = None)#

Bases: BaseCategory

index(value: float | str) int#

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

class boost_histogram.axis.Traits(underflow: 'bool' = False, overflow: 'bool' = False, circular: 'bool' = False, growth: 'bool' = False, continuous: 'bool' = False, ordered: 'bool' = False)#

Bases: object

circular: bool = False#
continuous: bool = False#
property discrete: bool#

True if axis is not continuous

growth: bool = False#
ordered: bool = False#
overflow: bool = False#
underflow: bool = False#
class boost_histogram.axis.Variable(edges: Iterable[float], *, metadata: Any = None, underflow: bool = True, overflow: bool = True, growth: bool = False, circular: bool = False, __dict__: dict[str, Any] | None = None)#

Bases: Axis

boost_histogram.axis.transform#

class boost_histogram.axis.transform.AxisTransform#

Bases: object

forward(value: float) float#

Compute the forward transform

inverse(value: float) float#

Compute the inverse transform

class boost_histogram.axis.transform.Function(forward: Any, inverse: Any, *, convert: Any = None, name: str = '')#

Bases: AxisTransform

class boost_histogram.axis.transform.Pow(power: float)#

Bases: AxisTransform

property power: float#

The power of the transform

boost_histogram.accumulators#

boost_histogram.accumulators.Accumulator#

alias of Any

boost_histogram.histogram#

boost_histogram.numpy#

boost_histogram.storage#

class boost_histogram.storage.AtomicInt64(*args: Any, **kwargs: Any)#

Bases: atomic_int64, Storage

accumulator#

alias of int

class boost_histogram.storage.Double(*args: Any, **kwargs: Any)#

Bases: double, Storage

accumulator#

alias of float

class boost_histogram.storage.Int64(*args: Any, **kwargs: Any)#

Bases: int64, Storage

accumulator#

alias of int

class boost_histogram.storage.Mean(*args: Any, **kwargs: Any)#

Bases: mean, Storage

class boost_histogram.storage.MultiCell(*args: Any, **kwargs: Any)#

Bases: multi_cell, Storage

accumulator#

alias of float

class boost_histogram.storage.Storage#

Bases: object

accumulator: ClassVar[type[int | float | accumulators.WeightedMean | accumulators.WeightedSum | accumulators.Mean]]#
class boost_histogram.storage.Unlimited(*args: Any, **kwargs: Any)#

Bases: unlimited, Storage

accumulator#

alias of float

class boost_histogram.storage.Weight(*args: Any, **kwargs: Any)#

Bases: weight, Storage

class boost_histogram.storage.WeightedMean(*args: Any, **kwargs: Any)#

Bases: weighted_mean, Storage

boost_histogram.tag#

boost_histogram.typing#

boost_histogram.typing.ArrayLike#

alias of Any

class boost_histogram.typing.AxisLike(*args, **kwargs)#

Bases: Protocol

index(value: float | str) int#
boost_histogram.typing.CppHistogram#

alias of Any

boost_histogram.typing.Mean#

alias of Any

class boost_histogram.typing.RebinProtocol(*args, **kwargs)#

Bases: Protocol

axis_mapping(axis: PlottableAxis) tuple[Sequence[int], PlottableAxis | None]#
boost_histogram.typing.Ufunc#

alias of Any

boost_histogram.typing.WeightedMean#

alias of Any

boost_histogram.typing.WeightedSum#

alias of Any

boost_histogram.view#