Skip to content

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)

Keyword argument sd= on PyMC scale-parameterized distributions such as Normal, HalfNormal, LogNormal, StudentT, TruncatedNormal, ZeroSumNormal, GaussianRandomWalk, AR, and SkewNormal.

Rename sd= to sigma=.

PyMC distributions removed the sd= keyword argument and raise TypeError. Use sigma=$V instead.

See all rules in the PyMC pack.