hist.axestuple module#

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

Bases: tuple

broadcast() 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.axestuple.AxesTuple(_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[float, ...]#

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 hist.axestuple.NamedAxesTuple(_AxesTuple__iterable: Iterable[Axis])#

Bases: 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.