Metadata-Version: 2.4
Name: distributional
Version: 1.0.1
Summary: A library for histogram arithmetic
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy~=2.4.6
Requires-Dist: matplotlib~=3.11.0
Provides-Extra: dev
Requires-Dist: pytest~=9.0.3; extra == "dev"
Requires-Dist: coverage~=7.14.1; extra == "dev"
Requires-Dist: pre-commit~=4.6.2; extra == "dev"
Requires-Dist: black~=26.5.1; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs~=1.6.1; extra == "docs"
Requires-Dist: mkdocstrings~=1.0.6; extra == "docs"
Requires-Dist: mkdocstrings-python~=2.0.5; extra == "docs"
Requires-Dist: seaborn~=0.13.2; extra == "docs"
Dynamic: license-file

# distributional

[![Tests](https://github.com/lucaslingle/distributional/actions/workflows/pytest.yml/badge.svg)](https://github.com/lucaslingle/distributional/actions/workflows/pytest.yml)

Histogram operations library.

### background

For continuous random variables that admit a density, a convenient nonparametric approximation is a piecewise constant version of that density.

If one integrates over each interval where the density is piecewise constant and replaces each original locally-constant density value by the value of the integral, one obtains the humble histogram.

This identity enables a number of useful operations like rebinning and inverse cdf calculation to be guided through the lens of the original density view.

The purpose of this library is unify many of the operations one might wish to perform on random variables, and to model these operations with corresponding piecewise constant densities, or equivalently, with their anodyne histogram representations.

### getting started
To install from github, clone this repo and run
```
pip install .
```

For unit testing and docs dependencies, replace ```.``` with ```'.[dev]'```, ```'.[docs]```, or ```'.[dev,docs]'```.

### documentation
To read online, you can go to https://distributional.readthedocs.io.

To read locally, you can run
```
mkdocs serve
```
in the project directory.
