Skip to content

Commit d89f879

Browse files
fix BetaBinomial new scalar shape handling
1 parent 0589203 commit d89f879

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc3/distributions/discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def __init__(self, alpha, beta, n, *args, **kwargs):
200200
self.mode = tt.cast(tround(alpha / (alpha + beta)), "int8")
201201

202202
def _random(self, alpha, beta, n, size=None):
203-
size = size or 1
203+
size = size or ()
204204
p = stats.beta.rvs(a=alpha, b=beta, size=size).flatten()
205205
# Sometimes scipy.beta returns nan. Ugh.
206206
while np.any(np.isnan(p)):

0 commit comments

Comments
 (0)