hist.tag module#
- class hist.tag.rebin(factor_or_axis: int | PlottableAxis | None = None, /, *, factor: int | None = None, groups: Sequence[int] | None = None, edges: Sequence[int | float] | None = None, axis: PlottableAxis | None = None)#
Bases:
object- axis#
- edges#
- factor#
- group_mapping(axis: PlottableAxis) Sequence[int]#
Return the list of group sizes (numbers of adjacent bins to merge) for
axis. For explicit groups, the sum of the group sizes must equal the number of bins in the axis. For a factor, this returnslen(axis) // factorgroups of sizefactor; if the factor does not divide the number of bins evenly, the leftover bins are not part of any group (a consumer should merge them into the overflow bin, matching the C++ factor-based rebinning).
- groups#
- hist.tag.sum(iterable, /, start=0)#
Return the sum of a ‘start’ value (default: 0) plus an iterable of numbers
When the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types.