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 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). It requires 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.2.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

uhi-0.2.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uhi-0.2.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for uhi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 97fdf50ac0fefd954b74697a19b04e2ca8b9303a825f5294d31338316ce5ab52
MD5 b21524e28ceb407545cde3ed5e6d9e31
BLAKE2b-256 2e3b711451db3d1f4a3f2e4c029367c025239eb31970d76385cc53ab121eaaf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uhi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for uhi-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 387f66cd0e89fdc3105fa15e96eddea16fe062dcd8b33b5c1e4971c966f9efe5
MD5 ba1a253de6016e0aad8d815309e68af4
BLAKE2b-256 9c307046fd215607e8af7b3360553ecadd37543251557186d0a584b7d83f6bca

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