File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -1721,7 +1721,7 @@ def sample_posterior_predictive(
1721
1721
param = cast (MultiTrace , _trace )._straces [chain_idx % nchain ].point (point_idx )
1722
1722
# ... or a PointList
1723
1723
else :
1724
- param = cast (PointList , _trace )[idx % len_trace ]
1724
+ param = cast (PointList , _trace )[idx % ( len_trace * nchain ) ]
1725
1725
# there's only a single chain, but the index might hit it multiple times if
1726
1726
# the number of indices is greater than the length of the trace.
1727
1727
else :
@@ -1730,7 +1730,6 @@ def sample_posterior_predictive(
1730
1730
values = draw_values (vars , point = param , size = size )
1731
1731
for k , v in zip (vars , values ):
1732
1732
ppc_trace_t .insert (k .name , v , idx )
1733
-
1734
1733
except KeyboardInterrupt :
1735
1734
pass
1736
1735
You can’t perform that action at this time.
0 commit comments