

axes.extent: A tuple of the axes extents (size with flow) axes.size: A tuple of the axes sizes (size without flow) axes.widths: The bin widths as a broadcasting-ready array axes.centers: The centers of the bins broadcasting-ready array axes.edges: The lower values as a broadcasting-ready array axes: Get the axes as a tuple-like (all properties of axes are available too) copy(deep=False): Make a copy of a histogram empty(flow=False): Check to see if the histogram is empty (can check flow bins too if asked) reset(): Set counters to 0 (growing axis remain the same size) counts(flow=False): Get the effective counts for all storage types variances(flow=False): Get the variances if available values(flow=False): Get a view on the values (counts or means, depending on storage) view(flow=False): Get a view on the bin contents (with or without under/overflow bins) to_numpy(flow=False, view=False): Convert to a NumPy style tuple (with or without under/overflow bins) ): Project down to listed axis (numbers). sum(flow=False): The total count of all bins storage_type: Fetch the histogram storage type kind: Either bh.Kind.COUNT or bh.Kind.MEAN, depending on storage

centers: The N bin centers (if continuous) bin(i): The bin edges (continuous axis) or a bin value (discrete axis) value(index): The value for a fractional bin (or bins) in the axis index(value): The index at a point (or points) on the axis bh.axis.StrCategory(, *, growth=False): String categories.bh.axis.IntCategory(, *, growth=False): Integer categories.bh.axis.Variable(, *, underflow=True, overflow=True, circular=False): Uneven bin spacing.bh.axis.Integer(start, stop, *, underflow=True, overflow=True, growth=False, circular=False): Special high-speed version of regular for evenly spaced bins of width 1.See also the flexible Function transform.circular=True: Turn on wrapping, so that out-of-range values wrap around into the axis.growth=True: Turn on growing axis, bins added when out-of-range items added.underflow=False: Turn off underflow bin.Many axis types (all support metadata=.).Cheatsheet Simplified list of features (click to expand) Histograms can be plotted via any compatible library, such as mplhep. We support the uhi PlottableHistogram protocol, so boost-histogram/ Hist values () # Make a new histogram with just the second axis, summing over the first, and # rebinning the second into larger bins: h2 = hist fill (, , ) # NumPy array view into histogram counts, no overflow bins values = hist. Regular ( 4, 0.0, 1.0 ), ) # Filling can be done with arrays, one per dimension hist. Text intro (click to expand) import boost_histogram as bh # Compose axis however you like this is a 2D histogram hist = bh. dask-histogram: Dask support for boost-histogram.

Histogram package in python for mac full#
Histogramming, while still providing the power of a full histogram object. Python bindings for Boost::Histogram ( source), a C++14 library.
