Skip to content

Commit

Permalink
Update gradients.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Nov 18, 2024
1 parent 6e9bfb0 commit a4ea9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gradients.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function finite_difference_gradient!(
# c1 denotes x1, c2 is epsilon
fx, c1, c2, c3 = cache.fx, cache.c1, cache.c2, cache.c3
if fdtype != Val(:complex) && ArrayInterface.fast_scalar_indexing(c2)
@. c2 = compute_epsilon(fdtype, x, relstep, absstep, dir)
@. c2 = compute_epsilon(fdtype, one(eltype(x)), relstep, absstep, dir)
copyto!(c1, x)
end
copyto!(c3, x)
Expand Down

0 comments on commit a4ea9ba

Please sign in to comment.