hist
Hist classes and utilities
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 on this page — 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
hist on PyPI
pip
pip install histuv
uv add histpoetry
poetry add histInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — boost-histogram, histoprint, numpy, packaging, typing-extensions |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 744,588/month — #5,172 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hist-2.11.0-py3-none-any.whl
Keywords: boost-histogram, dask-histogram, histogram
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
boost-histogramboost-histogram provides Python bindings to…
permissive · top 5,000 on PyPI
uhiUHI defines and documents a standard interface…
permissive · top 15,000 on PyPI
histoprintHistoprint renders NumPy histograms and…
permissive · top 15,000 on PyPI
hdrhistogramRecords and analyzes high-precision latency and…
permissive · top 15,000 on PyPI
hvplothvPlot provides a high-level plotting API that…
permissive · top 5,000 on PyPI
plotextRenders plots directly in the terminal using…
permissive · top 5,000 on PyPI
ggplotggplot is a Python implementation of the…
permissive · top 15,000 on PyPI
termplotlibtermplotlib renders line plots, histograms, and…
copyleft · top 15,000 on PyPI