Simple and fast histogramming in Python accelerated with OpenMP.
scikit-build-core
for packaging systemmp11
versiondensity=True
.pygram11.config
module.pygram11.without_omp
decoratorpygram11.with_omp
decoratorpygram11.disable_omp
context managerpygram11.force_omp
context managercons_var
) for returning variance instead of standard error.Renamed internal Python files hist.py
and misc.py
to _hist.py
and _misc.py
, respectively.
The contents of these modules are brought in to the main pygram11
module namespace by imports in __init__.py
(the submodules themselves are not meant to be part of the public API). This avoids tab completions of pygram11.hi<tab>
yielding pygram11.hist
when we actually want pygram11.histogram
.
Two convenience functions added to the pygram11
namespace:
bin_centers
: returns an array representing the the center of histogram bins given a total number of bins and an axis range or given existing bin edges.bin_edges
: returns an array representing bin edges given a total number of bins and an axis range.weights=None
now return None
as the second return. Previously the uncertainty was returned (which is just the square-root of the bin heights); now users can take the square-root themselves, and the back-end does not waste cycles tracking the uncertainty since it's trivial for unweighted histograms.np.float64
and np.float32
were the only supported array types, and we converted non-floating point input). Now signed and unsigned integer inputs (both 64 and 32 bit) are supported.
TypeError
is now raised. This library prioritizes performance; hidden performance hits are explicitly avoided.boost::mp11
as a submodule.libomp
from Homebrew installed at /opt/homebrew
.master
branch to main
.First release candidate for 0.11.0