Skip to content

Commit

Permalink
partially fixes pymc-devs#3688
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahanmr committed Mar 19, 2020
1 parent e2979a3 commit 3c22a9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pymc3/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ class Normal(Continuous):
def __init__(self, mu=0, sigma=None, tau=None, sd=None, **kwargs):
if sd is not None:
sigma = sd
warnings.warn(
"sd is deprecated, use sigma instead",
DeprecationWarning
)
tau, sigma = get_tau_sigma(tau=tau, sigma=sigma)
self.sigma = self.sd = tt.as_tensor_variable(sigma)
self.tau = tt.as_tensor_variable(tau)
Expand Down
5 changes: 5 additions & 0 deletions pymc3/distributions/mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import numpy as np
import theano
import theano.tensor as tt
import warnings

from pymc3.util import get_variable_name
from ..math import logsumexp
Expand Down Expand Up @@ -610,6 +611,10 @@ class NormalMixture(Mixture):
def __init__(self, w, mu, sigma=None, tau=None, sd=None, comp_shape=(), *args, **kwargs):
if sd is not None:
sigma = sd
warnings.warn(
"sd is deprecated, use sigma instead",
DeprecationWarning
)
_, sigma = get_tau_sigma(tau=tau, sigma=sigma)

self.mu = mu = tt.as_tensor_variable(mu)
Expand Down

0 comments on commit 3c22a9e

Please sign in to comment.