Skip to content

Commit fdf769d

Browse files
Update src/gradients.jl
1 parent 1f15677 commit fdf769d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gradients.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ function finite_difference_gradient!(
372372
end
373373
copyto!(c3, x)
374374
if fdtype == Val(:forward)
375-
fx0 = typeof(fx) != Nothing ? fx : f(x)
375+
fx0 = fx === nothing ? fx : f(x)
376376
for i in eachindex(x)
377377
epsilon = compute_epsilon(fdtype, x[i], relstep, absstep, dir)
378378
x_old = x[i]

0 commit comments

Comments
 (0)