Repository navigation
Highlights
-
Distribution-level support (
get_support) — every registered distribution now records where its outcomes live, distinct from each parameter's support:- Static supports:
get_support("normal")→(-∞, ∞),get_support("half_normal")→[0, ∞) - Parameter-dependent supports:
get_support("binomial", n=10)→[0, 10] ∩ ℤ— hypergeometric, truncated_normal, von_mises, generalized_pareto, generalized_extreme, and more derive bounds from parameter values - Symbolic resolution: called without values, bounds come back as the parameter names or expressions over them —
get_support("binomial")→[0, n] ∩ ℤ
- Static supports:
-
Downstream build-time checks can reject observations outside the likelihood's support and name the violated bound:
from distparams import get_support support = get_support("gamma") if not support.contains(y): raise ValueError(f"gamma requires observations in {support}, got {y}")
-
All built-in distributions declare supports (vector- and matrix-valued distributions excepted — the exempt list is pinned by the test suite).
Full changelog: v0.2.0...v0.3.0