Skip to content

Commit

Permalink
fix crucial ambiguity bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Feb 13, 2018
1 parent c4949e4 commit 87d5794
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/problems/discrete_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,26 @@ struct DiscreteProblem{uType,tType,isinplace,P,F,C} <: AbstractDiscreteProblem{u
end
end

function DiscreteProblem(f,u0,tspan::Tuple,p::Tuple;kwargs...)
iip = isinplace(f,4)
DiscreteProblem{iip}(f,u0,tspan,p;kwargs...)
end

function DiscreteProblem(f,u0,tspan::Tuple,p=nothing;kwargs...)
iip = isinplace(f,4)
DiscreteProblem{iip}(f,u0,tspan,p;kwargs...)
end

function DiscreteProblem(u0,tspan::Tuple,p::Tuple;kwargs...)
iip = typeof(u0) <: AbstractArray
if iip
f = DISCRETE_INPLACE_DEFAULT
else
f = DISCRETE_OUTOFPLACE_DEFAULT
end
DiscreteProblem{iip}(f,u0,tspan,p;kwargs...)
end

function DiscreteProblem(u0,tspan::Tuple,p=nothing;kwargs...)
iip = typeof(u0) <: AbstractArray
if iip
Expand Down

0 comments on commit 87d5794

Please sign in to comment.