pygram11

Simple and fast histogramming in Python accelerated with OpenMP.

MIT License

Downloads
3.6K
Stars
28
Committers
2
pygram11 - 0.7.3

Published by douglasdavis over 4 years ago

  • Improvements to the 2D backend calculations
  • Added array size thresholds for handing off to serialized fill methods
pygram11 - 0.7.2

Published by douglasdavis over 4 years ago

No real changes; minor release to fix conda-forge build on macOS

pygram11 - 0.7.1

Published by douglasdavis over 4 years ago

No real changes; minor release to fix MANIFEST.in for conda-forge builds.

pygram11 - 0.7.0

Published by douglasdavis over 4 years ago

  • OpenMP is now required to build from source (not a difficult dependency to satisfy)
    • omp function argument deprecated
    • omp_max_threads renamed to omp_get_max_threads to mirror OpenMP C API
    • omp_available function removed
  • Backend C++ code for 1D histograms rewritten (use Python and NumPy C APIs directly, no pybind11), more types supported (avoid conversions)
  • Rewrite multiweight histograms (still via pybind11) to support more types (avoid conversions)
  • Python code moved to the top level module (__init__.py) (without changing public API)
pygram11 - 0.6.1

Published by douglasdavis about 5 years ago

  • OpenMP inspection improved; new functions replace pygram11.OPENMP:
    • pygram11.omp_available() -> bool checks for availability
    • pygram11.omp_max_threads() -> int checks for the maximum available threads
  • some documentation improvements
  • bump pybind11 version to 2.4.3
  • pygram11.OPENMP will be removed in a future release
pygram11 - 0.6.0

Published by douglasdavis about 5 years ago

This is the first release dropping Python 2 support

  • Add type hints
  • Improve documentation
pygram11 - 0.5.2

Published by douglasdavis about 5 years ago

  • In the backend we replace std::unique_ptr<T[]> with std::vector<T> for on-thread arrays.
  • Improved documentation.

This is the last release supporting Python 2

pygram11 - 0.5.1

Published by douglasdavis about 5 years ago

  • Fix setup.py such that setuptools doesn't try to install numpy via easy_install (remove unnecessary setup_requires argument).
  • Add _max_threads attribute to pygram11._core.
  • Fixed macOS wheels (use delocate to ensure OpenMP symbols are bundled).
pygram11 - 0.5.0

Published by douglasdavis about 5 years ago

New features

  • histogramming multiple weight variations in a single function call is now possible via fix1dmw and var1dmw
  • In the NumPy like API, passing a 2 dimensional array to the weights argument will use this feature as well.
  • Binary wheels for Linux and macOS are provided on PyPI (conda-forge binaries are of course still available as well)

Other updates

  • All functions now return the sqrt(sum-of-weights-squared) instead of sum-of-weights; before v0.5.x the 2D functions returned the sum of weights squared.
pygram11 - 0.5.0.a2

Published by douglasdavis about 5 years ago

Second 0.5 series alpha.

  • Added fixed bin one dimensional multiweight histogramming to front end Python API.
  • Updated documentation
pygram11 - 0.5.0.a1

Published by douglasdavis about 5 years ago

First alpha for 0.5.x release series. This is meant to test manylinux2010 wheels uploaded to PyPI.

pygram11 - 0.4.0

Published by douglasdavis over 5 years ago

A breaking change to the API w.r.t. returns. All functions now return sum of weights squared, even if it's None. The histogramming functions previously had a single array returned if weights were not used. Now None is returned if no weights are used

>>> x = np.random.randn(1000)
>>> w = np.random.uniform(0.5, 0.8, x.shape[0])
>>> pygram11.histogram(x, bins=5, range=(-3, 3))
(array([ 30., 249., 450., 227.,  41.]), None)
>>> pygram11.histogram(x, bins=5, range=(-3, 3), weights=w)
(array([ 19.97159325, 162.31069262, 291.30576246, 147.4478516 ,
        27.12625336]), array([ 3.66815712, 10.36897935, 13.85860416,  9.86909866,  4.27544407]))

before this release the first histogram function call would not return a two entry tuple.

pygram11 - 0.3.1

Published by douglasdavis over 5 years ago

Tagging minor release for documentation updates

pygram11 - 0.3.0

Published by douglasdavis over 5 years ago

1D histograms now have a flow argument, when True the under and overflow contents are included in the first and last bins, respectively.

pygram11 - 0.2.2

Published by douglasdavis over 5 years ago

Backend maintenance

  • cleaning up some use of std::move
  • cleaning up multiple returns code
pygram11 - 0.2.1

Published by douglasdavis over 5 years ago

  • For 1D histogramming, allow the omp argument to be "auto".
    • For fixed width histograms OpenMP will be used for len(data) > 1e4, for variable width histograms its used for len(data) > 1e3. This is the new default.
    • If OpenMP is unavailable this is obviously ignored.
  • Fixes some warnings that showed up with the Apple Clang update (related to std::move).
pygram11 - 0.2.0

Published by douglasdavis over 5 years ago

  • New density argument for one dimensional histograms
  • New pygram11.utils module, houses a densify1d function used internally by the histogramming functions if the density argument is True.
pygram11 - 0.1.14

Published by douglasdavis over 5 years ago

First release to work with conda-forge.

pygram11 - 0.1.13

Published by douglasdavis over 5 years ago

Updated linker flags in setup.py for conda-forge OpenMP on macOS attempt.

pygram11 - 0.1.12

Published by douglasdavis over 5 years ago

Release with a cleaner setup.py OpenMP discovery workflow.