Skip to main content

Versatile, high-performance histogram toolkit for Numpy.

Project description

histbook

histbook computes histograms from Numpy arrays. It differs from most other histogramming tools in that its histograms are primarily tables of numbers, rather than display graphics. Histograms can be filled and refilled iteratively through a large dataset, or in parallel and later combined with addition*. Histograms have arbitrarily many dimensions with convenient methods for selecting, rebinning, and projecting into lower-dimensional spaces.

Axis dimensions are managed by algebraic expressions, rather than string labels or index positions, so they are computable: an axis named x + y requires two Numpy arrays, x and y, which will be added before filling the histogram. Expressions in different axes or different histograms in the same “book” (a collection of named histograms) are computed in an optimized way, reusing subexpressions wherever possible for quicker filling without giving up clarity.

Histogram data may be exported to a variety of formats, such as Pandas, ROOT, and HEPData. It can also be plotted with Vega-Lite, which makes short work of projecting many dimensions of data as overlays and trellises.

(*In this respect, histbook is like histogramming packages developed for particle physics, from CERN HBOOK in the 1970’s (name similarity intended) to modern-day ROOT.)

Installation

Install histbook like any other Python package:

pip install histbook --user

or similar (use sudo, --user, virtualenv, or pip-in-conda if you wish).

Strict dependencies:

Tutorial

See the project homepage for a tutorial.

Interactive tutorial

Run this tutorial on Binder.

Reference documentation

Download files

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

Source Distribution

histbook-1.2.5.tar.gz (667.8 kB view details)

Uploaded Source

File details

Details for the file histbook-1.2.5.tar.gz.

File metadata

  • Download URL: histbook-1.2.5.tar.gz
  • Upload date:
  • Size: 667.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for histbook-1.2.5.tar.gz
Algorithm Hash digest
SHA256 76d1f143f8abccf5539029fbef8133db84f377fc7752ac9e7e6d19ac9a277967
MD5 d662ba8051057bd12b530ad18786e217
BLAKE2b-256 3dbb6036779d2571c231ec257b994cb65cce83a103741a0c65403853043b7172

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