From 073a325bc998ccc1bcee0bed0897c75e7801a89e Mon Sep 17 00:00:00 2001 From: Thomas Wutzler Date: Thu, 26 Sep 2024 12:36:31 +0200 Subject: [PATCH] try to fix testset pointwise_logdensities chain --- test/pointwise_logdensities.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/pointwise_logdensities.jl b/test/pointwise_logdensities.jl index 914ce1d13..e796c89ef 100644 --- a/test/pointwise_logdensities.jl +++ b/test/pointwise_logdensities.jl @@ -56,12 +56,12 @@ end # Get some random `NamedTuple` samples from the prior. vals = [DynamicPPL.TestUtils.rand_prior_true(model) for _ = 1:5] # Concatenate the vector representations and create a `Chains` from it. - vals_arr = reduce(hcat, (mapreduce(DynamicPPL.tovec, vcat, values(nt) for nt in vals)) - chain = Chains(permutedims(vals_arr), map(Symbol, vns)) + vals_arr = reduce(hcat, mapreduce(DynamicPPL.tovec, vcat, values(nt)) for nt in vals) + chain = Chains(permutedims(vals_arr), map(Symbol, vns)); logjoints_pointwise = pointwise_logdensities(model, chain) # Get the sum of the logjoints for each of the iterations. logjoints = [ - sum(logjoints_pointwise[vn][idx] for vn in vns) + sum(logjoints_pointwise[string(vn)][idx] for vn in vns) for idx = 1:5 ] for (val, logp) in zip(vals, logjoints)