Skip to content

Commit 450197e

Browse files
fix: fix edge case in interpolation check
1 parent a224914 commit 450197e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solutions/ode_solutions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ function (sol::AbstractODESolution)(t::Number, ::Type{deriv}, idxs::AbstractVect
301301
any(isequal(NotSymbolic()), symbolic_type.(idxs))
302302
error("Incorrect specification of `idxs`")
303303
end
304-
if isempty(idxs)
304+
if symbolic_type(idxs) == NotSymbolic() && isempty(idxs)
305305
return eltype(eltype(sol.u))[]
306306
end
307307
error_if_observed_derivative(sol, idxs, deriv)
@@ -344,7 +344,7 @@ end
344344

345345
function (sol::AbstractODESolution)(t::AbstractVector{<:Number}, ::Type{deriv},
346346
idxs::AbstractVector, continuity) where {deriv}
347-
if isempty(idxs)
347+
if symbolic_type(idxs) == NotSymbolic() && isempty(idxs)
348348
return map(_ -> eltype(eltype(sol.u))[], t)
349349
end
350350
error_if_observed_derivative(sol, idxs, deriv)

0 commit comments

Comments
 (0)