Skip to main content

PyTensor-distributions

PyTensor-powered distributions

Overview

PyTensor-distributions provides a collection of core probability expressions implemented in PyTensor.

The goal of this package is to work as a unified, well-tested, and performant source for core probability expressions. This reduces redundancy across packages and allows other libraries to focus on providing specialized features and APIs on top of these core expressions.

The core expressions implemented in PyTensor-distributions are:

  • pdf: the probability density function of a distribution. (We use pdf for both discrete and continuous distributions)
  • cdf: the cumulative distribution function of a distribution.
  • ppf: the percent point function (inverse of cdf) of a distribution.
  • sf: the survival function (1 - cdf) of a distribution.
  • isf: the inverse survival function (inverse of sf) of a distribution.
  • logpdf: the log-probability of a distribution. (We use pdf for both discrete and continuous distributions)
  • logcdf: the log-cumulative distribution function of a distribution.
  • logsf: the log-survival function (1 - cdf) of a distribution
  • mean: the mean of a distribution.
  • mode: the mode of a distribution.
  • median: the median of a distribution.
  • var: the variance of a distribution.
  • std: the standard deviation of a distribution.
  • skewness: the skewness of a distribution.
  • kurtosis: the (excess) kurtosis of a distribution.
  • lmoments: The first L-moment is the mean, so we omit it. For the third and fourth L-moments, we use the ratios.
  • entropy: the entropy of a distribution.
  • rvs: the random variates of a distribution.

Some distributions may not implement all of these expressions.

The package follows a very minimal design, with one file per distribution and some utility files for common functions and tests. The core expressions are implemented as a collection of functions; no classes are used. This is on purpose, to keep the package as simple as possible and let other packages implement more structured APIs on top of these core expressions.

PyTensor-distributions is still in early development, and we are still adding more distributions and tests and working on improving robustness.

Contributions

PyTensor-distributions is a community project and welcomes contributions.

Code of Conduct

We follow the PyMC Code of Conduct

Donations

PyTensor-distributions, like other PyMC projects, is a non-profit project under the NumFOCUS umbrella. If you want to financially support PyTensor-distributions or other PyMC projects, you can donate here.

Sponsors

NumFOCUS

Release files for pytensor-distributions 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytensor-distributions 0.3.1
File Size Uploaded
pytensor_distributions-0.3.1.tar.gz 42.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytensor-distributions 0.3.1
File Interpreter ABI Platform
pytensor_distributions-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 110.3 kB

Release files / pytensor_distributions-0.3.1.tar.gz

Download URL pytensor_distributions-0.3.1.tar.gz
Size 42.1 kB
Tags Source
SHA-256 checksum
How to use checksums
de8f02f7a25e3d6945447e14022358ec794c12fc1dadc87d3f5bb255993a77b3
BLAKE2b-256 checksum
How to use checksums
84d71312100c7bc7e46108f3eaee7cc7fc93ec1c6cd8d540f40deeebbd08574b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release files / pytensor_distributions-0.3.1-py3-none-any.whl

Download URL pytensor_distributions-0.3.1-py3-none-any.whl
Size 68.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2e9c7f59743963fad166fb3cb7450d21211dd59c074ff316cb9f5c0b0e9f276
BLAKE2b-256 checksum
How to use checksums
0964e141cf3632a9ae0a2931312f4bb0e804e14b3964d7f24300bb53330e86db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page