Skip to content

Commit 8d84138

Browse files
authored
BUG clip effective sample size at maximum number of samples
1 parent 0a6078f commit 8d84138

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc3/diagnostics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def calc_n_eff(x):
259259

260260
t += 1
261261

262-
return int(m * n / (1. + 2 * rho[1:t].sum()))
262+
return min(m * n, int(m * n / (1. + 2 * rho[1:t].sum())))
263263

264264
n_eff = {}
265265
for var in mtrace.varnames:

0 commit comments

Comments
 (0)