hist.axis package#

Submodules#

hist.axis.transform module#

class hist.axis.transform.AxisTransform#

Bases: object

forward(value: float) float#

Compute the forward transform

inverse(value: float) float#

Compute the inverse transform

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

Bases: boost_histogram.axis.transform.AxisTransform

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

Bases: boost_histogram.axis.transform.AxisTransform

property power: float#

The power of the transform

Module contents#

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

Bases: tuple

broadcast() boost_histogram._internal.axestuple.A#

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 hist.axis.AxesMixin#

Bases: object

property label: str#

Get or set the label for the Regular axis

property name: str#

Get the name for the Regular axis

class hist.axis.AxisProtocol(*args, **kwargs)#

Bases: Protocol

label: str#
metadata: Any#
property name: str#
class hist.axis.Boolean(*, name: str = '', label: str = '', metadata: Any = None, __dict__: dict[str, Any] | None = None)#

Bases: hist.axis.AxesMixin, boost_histogram.axis.Boolean

class hist.axis.IntCategory(categories: Iterable[int], *, name: str = '', label: str = '', metadata: Any = None, growth: bool = False, __dict__: dict[str, Any] | None = None)#

Bases: hist.axis.AxesMixin, boost_histogram.axis.IntCategory

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

Bases: hist.axis.AxesMixin, boost_histogram.axis.Integer

class hist.axis.NamedAxesTuple(_AxesTuple__iterable: Iterable[boost_histogram.axis.Axis])#

Bases: boost_histogram.axis.AxesTuple

property label: tuple[str]#

The labels of the axes. Defaults to name if label not given, or Axis N if neither was given.

property name: tuple[str]#

The names of the axes. May be empty strings.

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

Bases: hist.axis.AxesMixin, boost_histogram.axis.Regular

class hist.axis.StrCategory(categories: Iterable[str], *, name: str = '', label: str = '', metadata: Any = None, growth: bool = False, __dict__: dict[str, Any] | None = None)#

Bases: hist.axis.AxesMixin, boost_histogram.axis.StrCategory

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

Bases: hist.axis.AxesMixin, boost_histogram.axis.Variable