From 59e0d63c05a7fca7b3130ead7c8f08d7838294c6 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:07:32 +0200 Subject: [PATCH] Avoid collecting v --- src/MarginalLogDensities.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MarginalLogDensities.jl b/src/MarginalLogDensities.jl index d767de3..115d127 100644 --- a/src/MarginalLogDensities.jl +++ b/src/MarginalLogDensities.jl @@ -290,7 +290,7 @@ function modal_hessian!(mld::MarginalLogDensity, w, p2) end function _marginalize(mld, v, data, method::LaplaceApprox, verbose) - p2 = (; p = data, v = collect(v)) + p2 = (; p = data, v = v) verbose && println("Finding mode...") wopt, objective = optimize_marginal!(mld, p2) verbose && println("Calculating hessian...")