Skip to main content

Simple Distributions: math operations, serializing, covariances

Project description

distl logo

simplified and condensed distributions

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

Dependencies

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.

Installation

To install the latest release via pip:

pip install distl

To install from source locally for a single user:

python setup.py build
python setup.py install --user

Or to install globally:

python setup.py build
sudo python setup.py install

Import

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)
print(g.sample())
print(g.sample(10))
g.plot(show=True)

Documentation and API Docs

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

Contributors

Kyle Conroy

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

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

distl-0.1.0.tar.gz (56.4 kB view details)

Uploaded Source

File details

Details for the file distl-0.1.0.tar.gz.

File metadata

  • Download URL: distl-0.1.0.tar.gz
  • Upload date:
  • Size: 56.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.18rc1

File hashes

Hashes for distl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0b5b8eaf22111c5f09891b6aa4e6eb4f1f1cf445dbff0a541895ad196dab134d
MD5 6cda291a7ded91717e5b79123f4a85a1
BLAKE2b-256 d04a55c96d43980f73e7509475eca0f9acbd0c0ab77f36bf102e1073e53634d9

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