Skip to main content

Unified Histogram Interface: tools to help library authors work with histograms

Project description

UHI: Universal Histogram Interface

Actions Status Documentation Status pre-commit.ci Status Code style: black

PyPI version Conda-forge version PyPI platforms

GitHub Discussion Gitter Zenodo Scikit-HEP

This is a package meant primarily for documenting histogram indexing and the PlottableHistogram Protocol and any future cross-library standards. It also contains the code for the PlottableHistogram Protocol, to be used in type checking libraries wanting to conform to the protocol. Eventually, it might gain a set of tools for testing conformance to UHI indexing, as well. It is not usually a runtime dependency, but only a type checking, testing, and/or docs dependency in support of other libraries (such as boost-histogram 0.13+, hist 2.1+, mplhep 0.2.15+, uproot 4+, and histoprint 2+). There are a few useful runtime usable components (listed below). Older versions are available for Python 3.6+. See what's new.

To assist plotting libraries in accepting Histograms from classic sources, see uhi.numpy_plottable.ensure_plottable_histogram, which will adapt NumPy style tuples into a simple PlottableHistogram.

The Protocols provided do support runtime checking, so isinstance(h, uhi.typing.plotting.PlottableHistogram) is valid at runtime and might be simpler than manually checking for the expected methods.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uhi-0.5.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

uhi-0.5.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file uhi-0.5.0.tar.gz.

File metadata

  • Download URL: uhi-0.5.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for uhi-0.5.0.tar.gz
Algorithm Hash digest
SHA256 9559bbf2f38f18a2fc1d8f73139396068f88f898d6a9afc833207ec0fd59a31c
MD5 ed3b397e5a981d97558e1223cba62dea
BLAKE2b-256 df6eed8eab1879cfd4df4f1a78b6e6a96f026024a6421eb76f6a03123bc7bf3e

See more details on using hashes here.

File details

Details for the file uhi-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: uhi-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for uhi-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5fc4620425a56ca22b7668fe6e328bf2ae349ddf07d402a7fa9d43341344de5
MD5 1f6544f1258c2f7aded1055a9ddeb66c
BLAKE2b-256 b00aff9bb3815e6995bd0c66a32259d2a197b7b85184fcf91648181dfd98799e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page