From 74e4defdb37e235d34c88f50a99bb380cbefcb46 Mon Sep 17 00:00:00 2001 From: lxvm Date: Sat, 2 Mar 2024 18:06:52 -0500 Subject: [PATCH] get_prototype for HCubatureJL --- src/Integrals.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Integrals.jl b/src/Integrals.jl index 1627304..e7d53ac 100644 --- a/src/Integrals.jl +++ b/src/Integrals.jl @@ -217,7 +217,7 @@ function __solvebp_call(cache::IntegralCache, alg::HCubatureJL, sensealg, domain rtol = reltol, atol = abstol, buffer = cache.cacheval, maxevals = maxiters, norm = alg.norm, initdiv = alg.initdiv) else - ret = _f((lb + ub) / 2) * (prod(ub - lb) / 2) # this calculation for type stability with vector endpoints + ret = get_prototype(prob) * (prod(ub - lb) / 2) # this calculation for type stability with vector endpoints hcubature(_f, lb, ub; rtol = reltol, atol = abstol, buffer = cache.cacheval, maxevals = maxiters, norm = alg.norm,