Skip to content

Commit 90cbc1a

Browse files
committed
Remove special iszero handling
1 parent af3e026 commit 90cbc1a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/levenberg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ end
185185

186186
function perform_step!(cache::LevenbergMarquardtCache{true})
187187
@unpack fu1, f, make_new_J = cache
188-
if _iszero(fu1)
188+
if iszero(fu1)
189189
cache.force_stop = true
190190
return nothing
191191
end
@@ -256,7 +256,7 @@ end
256256

257257
function perform_step!(cache::LevenbergMarquardtCache{false})
258258
@unpack fu1, f, make_new_J = cache
259-
if _iszero(fu1)
259+
if iszero(fu1)
260260
cache.force_stop = true
261261
return nothing
262262
end

src/utils.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ end
129129
concrete_jac(_) = nothing
130130
concrete_jac(::AbstractNewtonAlgorithm{CJ}) where {CJ} = CJ
131131

132-
# Circumventing https://github.com/SciML/RecursiveArrayTools.jl/issues/277
133-
_iszero(x) = iszero(x)
134-
_iszero(x::ArrayPartition) = all(_iszero, x.x)
135-
136132
_mutable_zero(x) = zero(x)
137133
_mutable_zero(x::SArray) = MArray(x)
138134

0 commit comments

Comments
 (0)