--- id: pytensor-distributions version: "0.2.0" license: unclear license_treatment: permissive maintenance: active --- # pytensor-distributions — PyTensor powered distributions. License: permissive · Maintenance: active · Downloads: 248.1K/mo ## What it is and what it does PyTensor-distributions is a library of probability distribution functions and statistical properties implemented as PyTensor symbolic expressions. It provides a unified, tested source for core probability operations—pdf, cdf, ppf, logpdf, mean, variance, entropy, and others—designed to reduce redundancy across the PyMC ecosystem and allow other libraries to build specialized APIs on top of these expressions. The package takes a minimal, function-based design approach: one file per distribution, no classes, and a focus on simplicity. It depends only on numpy and pytensor, making it lightweight to install. It is currently in active development (alpha status) and welcomes community contributions. Use it for: - Building probabilistic models in PyMC or other Bayesian inference frameworks that need standardized distribution expressions - Computing probability density, cumulative distribution, and inverse functions for statistical analysis workflows - Implementing custom probabilistic algorithms that require symbolic distribution operations via PyTensor - Reducing code duplication by using a shared, tested library of distribution implementations across multiple projects ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyTensor-distributions provides a collection of probability distribution functions (pdf, cdf, ppf, logpdf, etc.) and statistical properties (mean, variance, entropy, etc.) implemented as PyTensor expressions for use in probabilistic computing. Yes, if you are working with PyMC or building probabilistic models that benefit from PyTensor's symbolic computation. The low install friction, permissive license, and active maintenance make it a reasonable choice. However, the alpha status means the API and feature coverage may change; verify that the distributions and expressions you need are already implemented before committing to a production dependency. ## Install pip install pytensor-distributions uv add pytensor-distributions poetry add pytensor-distributions ## Installing pytensor-distributions Before you install: Low install friction; the package is a pure Python wheel with only numpy and pytensor as runtime dependencies. Actively maintained with a recent release, though still in alpha development status. License in practice: Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install pytensor-distributions import pytensor_distributions as ptd import numpy as np # Example: compute pdf of a distribution pdf_value = ptd.normal.pdf(x=0.0, mu=0.0, sigma=1.0) Requires Python 3.12 or later; pytensor must be installed and functional. Verify before relying: - Which specific distributions are currently implemented and which core expressions each supports - Performance characteristics compared to scipy or other probability libraries - API stability guarantees given the alpha development status ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 248.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags probability distributions pytensor, statistical functions pytensor, pdf cdf ppf implementations, probabilistic computing distributions, pytensor probability expressions, distribution statistics numpy, bayesian inference distributions, probabilistic-computing, symbolic-math [View on SkillFed](https://skillfed.io/packages/pytensor-distributions) · [View on PyPI](https://pypi.org/project/pytensor-distributions/)