--- id: hist version: "2.11.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # hist — Hist classes and utilities License: permissive · Maintenance: active · Downloads: 744.6K/mo ## What it is and what it does Hist is a front-end library for boost-histogram that simplifies histogram creation and manipulation for data analysis workflows. It extends boost-histogram with named axes, simpler construction syntax, and convenience methods for common operations like density computation, projection, and sorting. The library is designed for analysts and researchers who need to bin, aggregate, and visualize data without wrestling with low-level histogram APIs. The package includes plotting routines for 1D and 2D histograms, support for histogram stacks, and an extended indexing system (UHI+) that allows data-coordinate slicing and rebinning. It depends on boost-histogram for the core binning engine, numpy for array operations, and optional extras for plotting and fitting. The library is actively maintained, supports modern Python versions (3.10+), and is part of the Scikit-HEP ecosystem. Use it for: - Exploratory data analysis: quickly bin and visualize distributions with named axes and automatic plotting. - Physics analysis: work with multidimensional histograms using named axes and UHI+ indexing for event selection. - Statistical summaries: compute density arrays, project histograms to lower dimensions, or convert to profile histograms. - Stacked comparisons: group related histograms and plot them together with automatic legend generation. - Interactive notebooks: leverage built-in Jupyter representation and quick plotting for iterative analysis. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Hist provides a user-friendly interface for creating, filling, and analyzing histograms, built on top of boost-histogram with support for named axes, advanced indexing, and integrated plotting. Yes. Hist is actively maintained, has no known vulnerabilities, installs with low friction, and is BSD-3-Clause licensed. It is well-suited for anyone doing data binning or histogram analysis in Python, especially those working in scientific or physics domains. The named-axes interface and plotting integration make it more approachable than raw boost-histogram for exploratory work. ## Install pip install hist uv add hist poetry add hist ## Installing hist Before you install: Low friction installation as a pure Python wheel. Actively maintained with a release 4 days ago. Requires Python 3.10 or later and five runtime dependencies including boost-histogram and numpy, all standard scientific packages. License in practice: BSD-3-Clause is a permissive license allowing commercial use, modification, and distribution with minimal restrictions—suitable for most projects. Quickstart: pip install hist from hist import Hist h = Hist.new.Reg(10, 0, 1, name="x").Int64() h.fill(x=[0.1, 0.5, 0.9]) print(h) Requires Python 3.10 or later. Verify before relying: - Whether optional extras like [plot] and [fit] add significant dependencies or install friction. - Performance characteristics when working with very large histograms or high-dimensional data. - Compatibility with WebAssembly environments beyond the noted [fit] limitation. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 744.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags histogram library python, data binning and analysis, named axes histograms, scientific data visualization, boost-histogram wrapper, statistical data exploration, multidimensional histograms, histogramming, data-analysis, scientific-computing [View on SkillFed](https://skillfed.io/packages/hist) · [View on PyPI](https://pypi.org/project/hist/)