Fast simple 1D and 2D histograms for Python, using C extensions. Current version: 0.14, released 2024-08-12. Cadence: irregular.
Install & Compatibility
Where this runs
tested against v0.14 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.238s · 89.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.5s · import 0.262s · 86MB
89MB installed
● package 89MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Module name uses underscore, not hyphen
from fast_histogram import histogram1d
Correct import path
from fast_histogram import histogram2d
Compute a 1D histogram with 50 bins over range [-3, 3].
import numpy as np
from fast_histogram import histogram1d
data = np.random.randn(1000)
bins = 50
range_vals = (-3, 3)
h = histogram1d(data, bins=bins, range=range_vals)
print(h.shape)
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.