Skip to content

Commit

Permalink
make promote_u0 use isequal rather than ==
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Sep 4, 2024
1 parent af23a65 commit 0097ff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/forwarddiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ DiffEqBase.anyeltypedual(f::SciMLBase.AbstractSciMLFunction, ::Type{Val{counter}
@inline function promote_u0(u0, p, t0)
if SciMLStructures.isscimlstructure(p)
_p = SciMLStructures.canonicalize(SciMLStructures.Tunable(), p)[1]
if _p != p
if !isequal(_p, p)
return promote_u0(u0, _p, t0)
end
end
Expand All @@ -381,7 +381,7 @@ end
@inline function promote_u0(u0::AbstractArray{<:Complex}, p, t0)
if SciMLStructures.isscimlstructure(p)
_p = SciMLStructures.canonicalize(SciMLStructures.Tunable(), p)[1]
if _p != p
if !isequal(_p, p)
return promote_u0(u0, _p, t0)
end
end
Expand Down

0 comments on commit 0097ff5

Please sign in to comment.