Skip to content

Commit 0570918

Browse files
authored
Merge pull request #511 from lukego/mh-tidyup
Remove minor redundancy in metropolis_hastings
2 parents 6e87ca1 + 67df3ed commit 0570918

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/inference/mh.jl

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ Perform a Metropolis-Hastings update that proposes new values for the selected a
1414
function metropolis_hastings(
1515
trace, selection::Selection;
1616
check=false, observations=EmptyChoiceMap())
17-
args = get_args(trace)
18-
argdiffs = map((_) -> NoChange(), args)
19-
(new_trace, weight) = regenerate(trace, args, argdiffs, selection)
17+
(new_trace, weight) = regenerate(trace, selection)
2018
check && check_observations(get_choices(new_trace), observations)
2119
if log(rand()) < weight
2220
# accept

0 commit comments

Comments
 (0)