From 5727eeda1cf61e552cd26f3e518df7c44cf376ab Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Wed, 13 Dec 2023 16:57:24 -0500 Subject: [PATCH] Update coloring.jl --- src/highlevel/coloring.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/highlevel/coloring.jl b/src/highlevel/coloring.jl index d0c1b0da..c11ddabb 100644 --- a/src/highlevel/coloring.jl +++ b/src/highlevel/coloring.jl @@ -78,7 +78,7 @@ function (alg::ApproximateJacobianSparsity)(ad::AutoSparseFiniteDiff, f::F, x; f cache = FiniteDiff.JacobianCache(x, fx) J = fill!(similar(fx, length(fx), length(x)), 0) x_ = similar(x) - ε = eps(eltype(x))^(1 / 3) + ε = eps(eltype(x)) * 100 for _ in 1:ntrials randn!(rng, x_) J_cache = FiniteDiff.finite_difference_jacobian(f, x, cache) @@ -95,7 +95,7 @@ function (alg::ApproximateJacobianSparsity)(ad::AutoSparseFiniteDiff, f!::F, fx, J = fill!(similar(fx, length(fx), length(x)), 0) J_cache = similar(J) x_ = similar(x) - ε = eps(eltype(x))^(1 / 3) + ε = eps(eltype(x)) * 100 for _ in 1:ntrials randn!(rng, x_) FiniteDiff.finite_difference_jacobian!(J_cache, f!, x_, cache)