Closed ChrisRackauckas closed 5 years ago
MethodError: Bool(::ForwardDiff.Dual{ForwardDiff.Tag{getfield(DiffEqFlux, Symbol("##11#16")){Array{Float64,1},Base.Iterators.Pairs{Symbol,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Tuple{Symbol},NamedTuple{(:saveat,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}},getfield(Main, Symbol("##25#26")),DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,Nothing,DDEFunction{true,typeof(delay_lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tuple{MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}}},Float64},Float64,4}) is ambiguous. Candidates:
(T::Type{#s40} where #s40<:Real)(x::ForwardDiff.Dual) in Tracker at C:\Users\accou\.julia\dev\Tracker\src\lib\real.jl:108
Bool(x::Real) in Base at float.jl:73
Possible fix, define
Bool(::ForwardDiff.Dual)
convert(::Type{Bool}, ::ForwardDiff.Dual{ForwardDiff.Tag{getfield(DiffEqFlux, Symbol("##11#16")){Array{Float64,1},Base.Iterators.Pairs{Symbol,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Tuple{Symbol},NamedTuple{(:saveat,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}},getfield(Main, Symbol("##25#26")),DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,Nothing,DDEFunction{true,typeof(delay_lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tuple{MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}}},Float64},Float64,4}) at number.jl:7
DelayDiffEq.DDEIntegrator{Tsit5,true,Array{ForwardDiff.Dual{ForwardDiff.Tag{getfield(DiffEqFlux, Symbol("##11#16")){Array{Float64,1},Base.Iterators.Pairs{Symbol,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Tuple{Symbol},NamedTuple{(:saveat,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}},getfield(Main, Symbol("##25#26")),DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,Nothing,DDEFunction{true,typeof(delay_lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tuple{MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}}},Float64},Float64,4},1},Float64,Array{ForwardDiff.Dual{ForwardDiff.Tag{getfield(DiffEqFlux, Symbol("##11#16")){Array{Float64,1},Base.Iterators.Pairs{Symbol,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Tuple{Symbol},NamedTuple{(:saveat,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}},getfield(Main, Symbol("##25#26")),DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,Nothing,DDEFunction{true,typeof(delay_lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tuple{MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}}},Float64},Float64,4},1},ForwardDiff.Dual{ForwardDiff.Tag{getfield(DiffEqFlux, Symbol("##11#16")){Array{Float64,1},Base.Iterators.Pairs{Symbol,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Tuple{Symbol},NamedTuple{(:saveat,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}},getfield(Main, Symbol("##25#26")),DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,Nothing,DDEFunction{true,typeof(delay_lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tuple{MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}}},Float64},Float64,4},ForwardDiff.Dual{ForwardDiff.Tag{getfield(DiffEqFlux, Symbol("##11#16")){Array{Float64,1},Base.Iterators.Pairs{Symbol,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Tuple{Symbol},NamedTuple{(:saveat,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}},getfield(Main, Symbol("##25#26")),DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,Nothing,DDEFunction{true,typeof(delay_lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tuple{MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}}},Float64},Float64,4},ForwardDiff.Dual{ForwardDiff.Tag{getfield(DiffEqFlux, Symbol("##11#16")){Array{Float64,1},Base.Iterators.Pairs{Symbol,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Tuple{Symbol},NamedTuple{(:saveat,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}},getfield(Main, Symbol("##25#26")),DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,Nothing,DDEF...
The order of the arguments in the constructor is messed up somehow :open_mouth: Fixing that resolves the issue.
Found by DiffEqFlux tests: