Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

distl logo

simplified and condensed distributions

  pip install distl

badge badge badge badge badge badge badge

IMPORTANT: distl is currently still under development, is not yet well-tested, and is subject to significant API changes. Please keep posted until an official release is ready.

Read the latest documentation on readthedocs or browse the current documentation.

distl provides a python object-interface on top of several distribution (random variable) functions in scipy.stats and allows for:

  • serialization of distributions (so they can be saved to disk or pickled and sent to processors within MPI)
  • support for units and wrapping
  • conversion between different types of distributions
  • math between distributions, handling covariances from multivariate distributions wherever possible
  • plotting convenience functions

Getting Started


distl requires the following dependencies:

  • python 2.7+ or 3.6+
  • scipy 1.0+
  • numpy 1.10+

and the following optional dependencies:

  • matplotlib 2.2+ (required for plotting distributions)
  • corner (required for plotting multivariate distributions and distribution collections)
  • astropy 1.0+ (required for units support)
  • dill (required for saving/loading Function distributions)

You can see the Travis testing matrix for details on what exact versions have been tested and ensured to work. If you run into any issues with dependencies, please submit an issue.


To install the latest release via pip:

pip install distl

To install from source locally for a single user:

python build
python install --user

Or to install globally:

python build
sudo python install


Now from within python we can import the distl package:

import distl

and then create, sample from, and plot our first distribution:

g = distl.gaussian(10, 1)

Documentation and API Docs

Read the latest documentation on readthedocs or browse the current documentation.


Kyle Conroy

Contributions are welcome! Feel free to file an issue or fork and create a pull-request.