Skip to content

Commit 4fe636a

Browse files
committed
Add Constant Moment --updated
1 parent 8ac814a commit 4fe636a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pymc/distributions/discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ def get_moment(rv, size, c):
12211221
if not rv_size_is_none(size):
12221222
c = at.full(size, c)
12231223
return c
1224-
1224+
12251225
def logp(value, c):
12261226
r"""
12271227
Calculate log-probability of Constant distribution at specified value.

pymc/tests/test_distributions_moments.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
Beta,
99
Binomial,
1010
Cauchy,
11-
Constant,
1211
ChiSquared,
12+
Constant,
1313
Exponential,
1414
Gamma,
1515
HalfCauchy,
@@ -354,7 +354,7 @@ def test_weibull_moment(alpha, beta, size, expected):
354354
Weibull("x", alpha=alpha, beta=beta, size=size)
355355
assert_moment_is_expected(model, expected)
356356

357-
357+
358358
@pytest.mark.parametrize(
359359
"n, p, size, expected",
360360
[
@@ -383,7 +383,8 @@ def test_poisson_moment(mu, size, expected):
383383
with Model() as model:
384384
Poisson("x", mu=mu, size=size)
385385
assert_moment_is_expected(model, expected)
386-
386+
387+
387388
@pytest.mark.parametrize(
388389
"c, size, expected",
389390
[
@@ -396,4 +397,3 @@ def test_constant_moment(c, size, expected):
396397
with Model() as model:
397398
Constant("x", c=c, size=size)
398399
assert_moment_is_expected(model, expected)
399-

0 commit comments

Comments
 (0)