Skip to content

Commit

Permalink
Merge pull request #815 from AayushSabharwal/as/interp-fix
Browse files Browse the repository at this point in the history
fix: fix edge case in interpolation check
  • Loading branch information
ChrisRackauckas authored Oct 10, 2024
2 parents a224914 + 450197e commit 3abb733
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solutions/ode_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ function (sol::AbstractODESolution)(t::Number, ::Type{deriv}, idxs::AbstractVect
any(isequal(NotSymbolic()), symbolic_type.(idxs))
error("Incorrect specification of `idxs`")
end
if isempty(idxs)
if symbolic_type(idxs) == NotSymbolic() && isempty(idxs)
return eltype(eltype(sol.u))[]
end
error_if_observed_derivative(sol, idxs, deriv)
Expand Down Expand Up @@ -344,7 +344,7 @@ end

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

0 comments on commit 3abb733

Please sign in to comment.