Skip to content

Commit

Permalink
fix: tstops can be Real
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Nov 13, 2024
1 parent 485e6db commit 5ec1880
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ function init_up(prob::AbstractDEProblem, sensealg, u0, p, args...; kwargs...)
if tstops === nothing && has_kwargs(prob)
tstops = get(prob.kwargs, :tstops, nothing)
end
if !(tstops isa Union{Nothing, AbstractArray, Tuple}) && !SciMLBase.allows_late_binding_tstops(alg)
if !(tstops isa Union{Nothing, AbstractArray, Tuple, Real}) && !SciMLBase.allows_late_binding_tstops(alg)
throw(LateBindingTstopsNotSupportedError())
end
_prob = get_concrete_problem(prob, isadaptive(alg); u0 = u0, p = p, kwargs...)
Expand Down Expand Up @@ -1108,7 +1108,7 @@ function solve_up(prob::Union{AbstractDEProblem, NonlinearProblem}, sensealg, u0
if tstops === nothing && has_kwargs(prob)
tstops = get(prob.kwargs, :tstops, nothing)
end
if !(tstops isa Union{Nothing, AbstractArray, Tuple}) && !SciMLBase.allows_late_binding_tstops(alg)
if !(tstops isa Union{Nothing, AbstractArray, Tuple, Real}) && !SciMLBase.allows_late_binding_tstops(alg)
throw(LateBindingTstopsNotSupportedError())
end
_prob = get_concrete_problem(prob, isadaptive(alg); u0 = u0, p = p, kwargs...)
Expand Down

0 comments on commit 5ec1880

Please sign in to comment.