Skip to main content

No project description provided

Project description

The histpy library

The histpy library provides a Histogram class which is, essentially, an array with axes attached defining the bin boundaries. The histpy library class is loosely based on ROOT's histogram but using a more pythonic interface.

Full documentation: https://histpy.readthedocs.io

The histpy library supports:

  • Histograms with an arbitrary number of dimensions.
  • Numpy-like element indexing.
  • Multiple operations: projection, slicing, addition, multiplication, concatenation, rebinning, fitting, interpolation and plotting.
  • Tracking of under and overflow contents along each axes.
  • Weighted histograms.
  • Automatic error propagation.
  • Astropy's units, both for the histogram contents and the axis edges.
  • Spherical coordinates axes, using the HEALPix grid.
  • Sparse contents
  • I/O to/from HDF5 files.

Breaking changes

This section only summarizes non-backward compatible API changes. See CHANGELOG.md for the full list of changes and further details.

Version 2.0.0

  • Histogram no longer tracks under and overflow contents by default. To get the old behavior either set track_overflow = True or initialize the contents with a shape that includes the under and overflow bins.
  • Axis.to() now returns a new Axis object by default, instead of modifying it in place. To get the old behavior, add the argument copy = False.
  • The output format of Axes.interp_weights() has changed. Previously, it returned all bins and weights combinations needed for the interpolation. It now returns interpolation indices and weights for each individual dimension. If the user wishes to recover the points and weights in the old format, this may be done with the following code snippet:
    bins_old = np.asarray(list(itertools.product(*bins_new)))
    weights_old = np.prod(np.array(list(itertools.product(*weights_new))), axis = 1)
    
  • The Axes.__array__() interface has been removed.

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

histpy-2.0.4.tar.gz (64.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

histpy-2.0.4-py3-none-any.whl (46.3 kB view details)

Uploaded Python 3

File details

Details for the file histpy-2.0.4.tar.gz.

File metadata

  • Download URL: histpy-2.0.4.tar.gz
  • Upload date:
  • Size: 64.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for histpy-2.0.4.tar.gz
Algorithm Hash digest
SHA256 2355ca8e2d04d755be1aac16b6f516641de8a472ffd0a59f54ee1f7a85aa80d2
MD5 474c0a75cb8955de2a7bb0fdc92ea86b
BLAKE2b-256 286a5abea96b4d306774deb2f613c7f902103b5ab9955359f1b43bda1eb1fa84

See more details on using hashes here.

File details

Details for the file histpy-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: histpy-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 46.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for histpy-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d65ad705765abb4d28e81256f9978e2e8bf53e87d94b5f4a9faceb089c7ce1
MD5 4e49bdbbea059a681e5fcd88cec99b5f
BLAKE2b-256 e0a7a2daed054c977263d2d2524b11274d79428b9250504f080c00460feb8c2a

See more details on using hashes here.

Supported by

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