Skip to content

Commit 83c33a8

Browse files
committed
Positional argument fix for DiscreteBound
1 parent 892f0ae commit 83c33a8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pymc3/distributions/bound.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def __init__(self, distribution, lower, upper,
103103
default = lower + 1
104104

105105
super().__init__(
106-
distribution=distribution, lower=lower, upper=upper,
107-
default=default, *args, **kwargs)
106+
distribution, lower, upper,
107+
default, *args, transform=transform, **kwargs)
108108

109109

110110
class _ContinuousBounded(_Bounded, Continuous):

pymc3/tests/test_distributions.py

+5
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,11 @@ def test_bound():
13001300
BoundNormalPositionalArgs = Bound(Normal, upper=6)("x", 2., 1.)
13011301

13021302

1303+
with Model():
1304+
BoundPoissonNamedArgs = Bound(Poisson, upper=6)("y", mu=2.)
1305+
BoundPoissonPositionalArgs = Bound(Poisson, upper=6)("x", 2.)
1306+
1307+
13031308
class TestLatex:
13041309

13051310
def setup_class(self):

0 commit comments

Comments
 (0)