Skip to content

Commit 3c22a9e

Browse files
committed
partially fixes pymc-devs#3688
1 parent e2979a3 commit 3c22a9e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pymc3/distributions/continuous.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ class Normal(Continuous):
476476
def __init__(self, mu=0, sigma=None, tau=None, sd=None, **kwargs):
477477
if sd is not None:
478478
sigma = sd
479+
warnings.warn(
480+
"sd is deprecated, use sigma instead",
481+
DeprecationWarning
482+
)
479483
tau, sigma = get_tau_sigma(tau=tau, sigma=sigma)
480484
self.sigma = self.sd = tt.as_tensor_variable(sigma)
481485
self.tau = tt.as_tensor_variable(tau)

pymc3/distributions/mixture.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import numpy as np
1717
import theano
1818
import theano.tensor as tt
19+
import warnings
1920

2021
from pymc3.util import get_variable_name
2122
from ..math import logsumexp
@@ -610,6 +611,10 @@ class NormalMixture(Mixture):
610611
def __init__(self, w, mu, sigma=None, tau=None, sd=None, comp_shape=(), *args, **kwargs):
611612
if sd is not None:
612613
sigma = sd
614+
warnings.warn(
615+
"sd is deprecated, use sigma instead",
616+
DeprecationWarning
617+
)
613618
_, sigma = get_tau_sigma(tau=tau, sigma=sigma)
614619

615620
self.mu = mu = tt.as_tensor_variable(mu)

0 commit comments

Comments
 (0)