@@ -573,7 +573,7 @@ function build_null_integrator(prob::AbstractDEProblem, args...;
573
573
typeof (prob. f), typeof (prob. p),
574
574
}(Float64[],
575
575
Float64[],
576
- first ( prob. tspan) ,
576
+ prob. tspan[ 1 ] ,
577
577
prob,
578
578
sol,
579
579
prob. f,
@@ -1015,7 +1015,7 @@ function solve_call(prob::SteadyStateProblem,
1015
1015
end
1016
1016
1017
1017
function solve (prob:: EnsembleProblem , args... ; kwargs... )
1018
- if isempty (args) || length (args) == 1 && typeof (args[ 1 ] ) <: EnsembleAlgorithm
1018
+ if isempty (args) || length (args) == 1 && typeof (first ( args) ) <: EnsembleAlgorithm
1019
1019
__solve (prob, nothing , args... ; kwargs... )
1020
1020
else
1021
1021
__solve (prob, args... ; kwargs... )
@@ -1270,7 +1270,7 @@ function __solve(prob::AbstractDEProblem, args...; default_set = false, second_t
1270
1270
kwargs... )
1271
1271
if second_time
1272
1272
throw (NoDefaultAlgorithmError ())
1273
- elseif length (args) > 0 && ! (typeof (args[ 1 ] ) <: Union{Nothing, AbstractDEAlgorithm} )
1273
+ elseif length (args) > 0 && ! (typeof (first ( args) ) <: Union{Nothing, AbstractDEAlgorithm} )
1274
1274
throw (NonSolverError ())
1275
1275
else
1276
1276
__solve (prob, nothing , args... ; default_set = false , second_time = true , kwargs... )
@@ -1281,7 +1281,7 @@ function __init(prob::AbstractDEProblem, args...; default_set = false, second_ti
1281
1281
kwargs... )
1282
1282
if second_time
1283
1283
throw (NoDefaultAlgorithmError ())
1284
- elseif length (args) > 0 && ! (typeof (args[ 1 ] ) <: Union{Nothing, AbstractDEAlgorithm} )
1284
+ elseif length (args) > 0 && ! (typeof (first ( args) ) <: Union{Nothing, AbstractDEAlgorithm} )
1285
1285
throw (NonSolverError ())
1286
1286
else
1287
1287
__init (prob, nothing , args... ; default_set = false , second_time = true , kwargs... )
@@ -1449,16 +1449,16 @@ function _solve_forward(prob, sensealg, u0, p, originator, args...; merge_callba
1449
1449
end
1450
1450
1451
1451
@inline function extract_alg (solve_args, solve_kwargs, prob_kwargs)
1452
- if isempty (solve_args) || isnothing (solve_args[ 1 ] )
1452
+ if isempty (solve_args) || isnothing (first ( solve_args) )
1453
1453
if haskey (solve_kwargs, :alg )
1454
1454
solve_kwargs[:alg ]
1455
1455
elseif haskey (prob_kwargs, :alg )
1456
1456
prob_kwargs[:alg ]
1457
1457
else
1458
1458
nothing
1459
1459
end
1460
- elseif solve_args[ 1 ] isa SciMLBase. AbstractSciMLAlgorithm
1461
- solve_args[ 1 ]
1460
+ elseif first ( solve_args) isa SciMLBase. AbstractSciMLAlgorithm
1461
+ first ( solve_args)
1462
1462
else
1463
1463
nothing
1464
1464
end
0 commit comments