pymc/removed-sd-parameter
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| PyMC | error | safe, with xpd check --fix |
PyMC 5.0+ |
PyMC distributions removed the legacy sd= parameter in favor of sigma=, so passing sd= raises TypeError.
beta = pm.Normal("beta", mu=0.0, sd=1.0)beta = pm.Normal("beta", mu=0.0, sigma=1.0)noise = pm.HalfNormal("noise", sd=1.0)noise = pm.HalfNormal("noise", sigma=1.0)What the rule reports
Section titled “What the rule reports”Keyword argument sd= on PyMC scale-parameterized distributions such as Normal, HalfNormal, LogNormal, StudentT, TruncatedNormal, ZeroSumNormal, GaussianRandomWalk, AR, and SkewNormal.
How to fix it
Section titled “How to fix it”Rename sd= to sigma=.
Diagnostic message
Section titled “Diagnostic message”PyMC distributions removed the sd= keyword argument and raise TypeError. Use sigma=$V instead.See all rules in the PyMC pack.