Skip to content

Commit

Permalink
Use size instead of shape in pymc3.tests.sampler_fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard authored and twiecki committed Jun 5, 2021
1 parent 4b7c18f commit 090fb88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pymc3/tests/sampler_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class NormalFixture(KnownMean, KnownVariance, KnownCDF):
@classmethod
def make_model(cls):
with pm.Model() as model:
a = pm.Normal("a", mu=2, sigma=np.sqrt(3), shape=10)
a = pm.Normal("a", mu=2, sigma=np.sqrt(3), size=10)
return model


Expand All @@ -91,7 +91,7 @@ class BetaBinomialFixture(KnownCDF):
@classmethod
def make_model(cls):
with pm.Model() as model:
p = pm.Beta("p", [0.5, 0.5, 1.0], [0.5, 0.5, 1.0], shape=3)
p = pm.Beta("p", [0.5, 0.5, 1.0], [0.5, 0.5, 1.0], size=3)
pm.Binomial("y", p=p, n=[4, 12, 9], observed=[1, 2, 9])
return model

Expand Down Expand Up @@ -121,7 +121,7 @@ class LKJCholeskyCovFixture(KnownCDF):
def make_model(cls):
with pm.Model() as model:
sd_mu = np.array([1, 2, 3, 4, 5])
sd_dist = pm.Lognormal.dist(mu=sd_mu, sigma=sd_mu / 10.0, shape=5)
sd_dist = pm.Lognormal.dist(mu=sd_mu, sigma=sd_mu / 10.0, size=5)
chol_packed = pm.LKJCholeskyCov("chol_packed", eta=3, n=5, sd_dist=sd_dist)
chol = pm.expand_packed_triangular(5, chol_packed, lower=True)
cov = at.dot(chol, chol.T)
Expand Down

0 comments on commit 090fb88

Please sign in to comment.