Install & Compatibility
Where this runs
tested against v0.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
build_error
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 17.1s · import 1.914s · 497MB
535MB installed
● package 535MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Normal
✓ from preliz import Normal
✗ from preliz.distributions import Normal
As of v0.20.0, distributions are directly available from the top-level 'preliz' module. The old path was deprecated.
preliz
✓ import preliz
General import for accessing the library's features.
Demonstrates how to define a distribution, calculate its PDF, sample from it, and convert it to a scipy.stats compatible object.
import preliz
import numpy as np
# Define a Normal distribution
norm_dist = preliz.Normal(mu=0, sigma=1)
# Get PDF at a specific point
print(f"PDF at x=0: {norm_dist.pdf(0):.3f}")
# Sample from the distribution
samples = norm_dist.rvs(size=100)
print(f"Mean of 100 samples: {np.mean(samples):.2f}")
print(f"Std dev of 100 samples: {np.std(samples):.2f}")
# Access a scipy.stats compatible object (if needed)
scipy_norm = norm_dist.to_scipy()
print(f"Scipy PDF at x=0: {scipy_norm.pdf(0):.3f}")
Debug
Known issues
breakingDirect import paths for individual distributions changed in `0.20.0`. Previously, distributions like `Normal` were imported from `preliz.distributions`. Now, they are directly available from the top-level `preliz` module.fixUpdate your import statements. For example, change `from preliz.distributions import Normal` to `from preliz import Normal`. A backward-compatible `from preliz import distributions` was added in `0.22.0`, but direct import is preferred.
affects: >=0.20.0
gotchaPreliz distribution objects are not direct subclasses of `scipy.stats` distributions and cannot be used interchangeably with `scipy.stats` functions without explicit conversion. They offer their own `pdf()`, `cdf()`, `rvs()` methods.fixUse the `to_scipy()` method available on `preliz` distribution objects to obtain a `scipy.stats` compatible distribution, or directly use the `preliz` object's native methods for calculations and sampling.
affects: All versions
deprecatedThe plotting methods `plot_pdf()` and `plot_cdf()` on distribution objects have been deprecated in favor of a more unified `plot()` method.fixReplace calls to `dist.plot_pdf()` or `dist.plot_cdf()` with `dist.plot()`. You can specify the desired plot type using the `plot_type` argument, e.g., `dist.plot(plot_type='pdf')`.
affects: Likely >=0.22.0 (check specific changelog)
Upgrade
Version history
0.26.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
No dependency data recorded yet.