From 0b9da1e7d8545a6e2821a099d3e061e9ea164553 Mon Sep 17 00:00:00 2001 From: Anika Thakur Date: Sun, 15 Mar 2026 14:42:15 -0400 Subject: [PATCH 1/2] Clarified wording --- pymc/distributions/multivariate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pymc/distributions/multivariate.py b/pymc/distributions/multivariate.py index 6f8a2abe26..af5a3dd7b2 100644 --- a/pymc/distributions/multivariate.py +++ b/pymc/distributions/multivariate.py @@ -996,8 +996,11 @@ class Wishart(Continuous): Notes ----- - This distribution is unusable in a PyMC model. You should instead - use LKJCholeskyCov or LKJCorr. + This distribution is not recommended as a prior distribution for MCMC + sampling. Most samplers operate in unconstrained space and proposals + rarely satisfy the symmetric positive definite constraint, causing + sampling to fail or perform poorly. Consider using LKJCholeskyCov or + LKJCorr instead. """ rv_op = wishart From 068355e770b514c1aeedd52a42bdb5c84a041f70 Mon Sep 17 00:00:00 2001 From: Anika Thakur Date: Sat, 21 Mar 2026 16:25:08 -0400 Subject: [PATCH 2/2] removed wishart warning --- pymc/distributions/multivariate.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pymc/distributions/multivariate.py b/pymc/distributions/multivariate.py index af5a3dd7b2..8e28c70761 100644 --- a/pymc/distributions/multivariate.py +++ b/pymc/distributions/multivariate.py @@ -1010,16 +1010,6 @@ def dist(cls, nu, V, *args, **kwargs): nu = pt.as_tensor_variable(nu, dtype=int) V = pt.as_tensor_variable(V) - warnings.warn( - "The Wishart distribution can currently not be used " - "for MCMC sampling. The probability of sampling a " - "symmetric matrix is basically zero. Instead, please " - "use LKJCholeskyCov or LKJCorr. For more information " - "on the issues surrounding the Wishart see here: " - "https://github.com/pymc-devs/pymc/issues/538.", - UserWarning, - ) - # mean = nu * V # p = V.shape[0] # mode = pt.switch(pt.ge(nu, p + 1), (nu - p - 1) * V, np.nan)