distribution-algebra
A python package that implements an easy-to-use interface for random variables, statistical distributions, and their algebra.
This Python package is brought to you by Vaibhav Karve.
distribution-algebra recognizes Normal, Lognormal, Beta and Poisson
distributions. The package implements an interface to easily construct
user-defined Univariate distributions as well Vectorized distributions.
Additional features include:
- A
plotfunction for probability density/mass function plotting. - A
drawfunction for drawing random samples of specified size from a given distribution. - Addition and multiplication operations defined directly on distributions:
- For example, the sum of two Normal (Poisson) distributions is Normal (Poisson).
- The product of two Lognormal distributions is Lognormal.
- The sum of two arbitrary univariate distributions is expressed as a Vectorized distribution.
This package is written in Python v3.10, and is publicly available under the GNU-GPL-v3.0 license.
Installation and usage
To get started on using this package,
-
Install Python 3.10 or higher.
-
python3.10 -m pip install distribution-algebra -
Use it in a python script (or interactive REPL)
from distribution_algebra import Beta, Lognormal, Normal, Poisson x: Normal = Normal(mean=1.0, var=9.0) y: Normal = Normal(mean=1.0, var=16.0) assert x + y == Normal(mean=2.0, var=25.0)
Metadata
Release files for distribution-algebra 0.1.26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| distribution_algebra-0.1.26.tar.gz | 27.6 kB | Without provenance | Details for distribution_algebra-0.1.26.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| distribution_algebra-0.1.26-py3-none-any.whl | Python 3 | none | any | Details for distribution_algebra-0.1.26-py3-none-any.whl |
Total release size: 60.3 kB
Release files / distribution_algebra-0.1.26.tar.gz
| Download URL | distribution_algebra-0.1.26.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6da9a9d2a345f3ce02715e8d40523ebe4ed79a489485e14c4d2662cc7cc540bc
|
|
BLAKE2b-256 checksum How to use checksums |
6b1fd244612128bb26eb8c01d6c9626df828ed0d3de8414724ffb0d1fdcef863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.4 Linux/6.9.3-76060903-generic
|
Release files / distribution_algebra-0.1.26-py3-none-any.whl
| Download URL | distribution_algebra-0.1.26-py3-none-any.whl |
|---|---|
| Size | 32.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26d7a34742fc3b8323131de23a27349a0d57287bf026735b3ebf6c0fa595e958
|
|
BLAKE2b-256 checksum How to use checksums |
e1e5f971066ef293f7ea8d3842762d602e15f3b69a482975c5b6e2980eab99cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.4 Linux/6.9.3-76060903-generic
|
Security for distribution-algebra 0.1.26
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.