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

Metadata

Release files for pytensor-distributions 0.3.3

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.3
File Size Uploaded
pytensor_distributions-0.3.3.tar.gz 45.7 kB Details

Built distribution (wheel)

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

Total release size: 118.9 kB

Release files / pytensor_distributions-0.3.3.tar.gz

Download URL pytensor_distributions-0.3.3.tar.gz
Size 45.7 kB
Tags Source
SHA-256 checksum
How to use checksums
14ff39aef4285c6c6a1cd5cfbe815bd68def3a99b2e643b60ebbc748f8cc591a
BLAKE2b-256 checksum
How to use checksums
ee5de82c6407a2e76f579f0f2c98efdb25a7511d5b195f1b9ae5228b60c9f228
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 Oct 6, 2026.

Transparency log

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

Download URL pytensor_distributions-0.3.3-py3-none-any.whl
Size 73.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d67ab816314afba472c7b9abe928d64d34e90852aa3153bf015e5c1903b1cc8c
BLAKE2b-256 checksum
How to use checksums
c906c0d7bf91f8e2391be8dd925514ab9a853c21b279a0cb5682eabe21d67295
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 Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

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