From 0097ff563dfe0d0df7d79a4eb0737ad09c8c260a Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Wed, 4 Sep 2024 11:45:46 -0400 Subject: [PATCH] make `promote_u0` use `isequal` rather than `==` --- src/forwarddiff.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forwarddiff.jl b/src/forwarddiff.jl index 1e9cbfcd5..5a199433c 100644 --- a/src/forwarddiff.jl +++ b/src/forwarddiff.jl @@ -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 @@ -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