From a1eec6e8e7cdb2e5d452e2e542f9804e0bfd5d84 Mon Sep 17 00:00:00 2001 From: Xianda Sun <5433119+sunxd3@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:00:50 +0800 Subject: [PATCH] Update ext/JuliaBUGSMCMCChainsExt.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ext/JuliaBUGSMCMCChainsExt.jl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ext/JuliaBUGSMCMCChainsExt.jl b/ext/JuliaBUGSMCMCChainsExt.jl index 6a1aab364..8febc4f40 100644 --- a/ext/JuliaBUGSMCMCChainsExt.jl +++ b/ext/JuliaBUGSMCMCChainsExt.jl @@ -69,8 +69,17 @@ function JuliaBUGS.gen_chains( generated_quantities = [] for i in axes(samples)[1] evaluation_env = first(evaluate!!(model, LogDensityContext(), samples[i])) - push!(param_vals, [AbstractPPL.get(evaluation_env, param_var) for param_var in param_vars]) - push!(generated_quantities, [AbstractPPL.get(evaluation_env, generated_var) for generated_var in generated_vars]) + push!( + param_vals, + [AbstractPPL.get(evaluation_env, param_var) for param_var in param_vars], + ) + push!( + generated_quantities, + [ + AbstractPPL.get(evaluation_env, generated_var) for + generated_var in generated_vars + ], + ) end param_name_leaves = collect(