From d3c0827f3389c3583c7edc9d12b3c74e0cf7cfca Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Wed, 17 Apr 2024 15:17:22 +0530 Subject: [PATCH] fix: fix symbolic idxs interpolation for RODESolution --- src/solutions/rode_solutions.jl | 2 +- test/downstream/solution_interface.jl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/solutions/rode_solutions.jl b/src/solutions/rode_solutions.jl index 138198d78..f1fe04972 100644 --- a/src/solutions/rode_solutions.jl +++ b/src/solutions/rode_solutions.jl @@ -63,7 +63,7 @@ end function (sol::RODESolution)(t, ::Type{deriv} = Val{0}; idxs = nothing, continuity = :left) where {deriv} - sol.interp(t, idxs, deriv, sol.prob.p, continuity) + sol(t, deriv, idxs, continuity) end function (sol::RODESolution)(v, t, ::Type{deriv} = Val{0}; idxs = nothing, continuity = :left) where {deriv} diff --git a/test/downstream/solution_interface.jl b/test/downstream/solution_interface.jl index a704bd682..8bc804f98 100644 --- a/test/downstream/solution_interface.jl +++ b/test/downstream/solution_interface.jl @@ -62,6 +62,7 @@ sol = solve(sprob, ImplicitEM()) @test_throws Exception sol[a] @test_throws Exception sol[noisy_population_model.a] @test_throws Exception sol[:a] +@test_nowarn sol(0.5, idxs = noisy_population_model.s1) ### Tests on layered model (some things should not work). ### @parameters σ ρ β