Skip to content

Commit

Permalink
Convert random variables to value variables (#7284)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomicapretto authored Apr 28, 2024
1 parent 60a6314 commit a74c03f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pymc/sampling/mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ def sample(

if var_names is not None:
trace_vars = [v for v in model.unobserved_RVs if v.name in var_names]
trace_vars = model.replace_rvs_by_values(trace_vars)
assert len(trace_vars) == len(var_names), "Not all var_names were found in the model"
else:
trace_vars = None
Expand Down

0 comments on commit a74c03f

Please sign in to comment.