Skip to content

Commit

Permalink
move copy inside get_ith_value
Browse files Browse the repository at this point in the history
  • Loading branch information
deoxyribose authored Dec 18, 2023
1 parent a975ab3 commit 9c18d50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpyro/contrib/control_flow/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ def get_ith_value(site):
):
return site

site = site.copy()
site["value"] = site["value"][i]
return site

return {k: get_ith_value(v.copy()) for k, v in replay_trace.items()}
return {k: get_ith_value(v) for k, v in replay_trace.items()}


def _subs_wrapper(subs_map, i, length, site):
Expand Down

0 comments on commit 9c18d50

Please sign in to comment.