From 67df3ed8a5f291d0e2c3a161f04679cc02890b2a Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Tue, 10 Oct 2023 10:03:33 +0200 Subject: [PATCH] Remove minor redundancy in metropolis_hastings --- src/inference/mh.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/inference/mh.jl b/src/inference/mh.jl index 04f904fb3..bdb89fd73 100644 --- a/src/inference/mh.jl +++ b/src/inference/mh.jl @@ -14,9 +14,7 @@ Perform a Metropolis-Hastings update that proposes new values for the selected a function metropolis_hastings( trace, selection::Selection; check=false, observations=EmptyChoiceMap()) - args = get_args(trace) - argdiffs = map((_) -> NoChange(), args) - (new_trace, weight) = regenerate(trace, args, argdiffs, selection) + (new_trace, weight) = regenerate(trace, selection) check && check_observations(get_choices(new_trace), observations) if log(rand()) < weight # accept