Skip to content

Commit

Permalink
return all the args
Browse files Browse the repository at this point in the history
  • Loading branch information
Miha Zgubic committed Aug 6, 2021
1 parent daea9aa commit be9dbdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/finite_difference_calls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function _make_jvp_call(fdm, f, y, xs, ẋs, ignores)
f2 = _wrap_function(f, xs, ignores)

ignores = collect(ignores)
all(ignores) && return NoTangent()
all(ignores) && return ntuple(_ -> NoTangent(), length(xs))
sigargs = zip(xs[.!ignores], ẋs[.!ignores])
return _maybe_fix_to_composite(y, jvp(fdm, f2, sigargs...))
end
Expand All @@ -45,7 +45,7 @@ function _make_j′vp_call(fdm, f, ȳ, xs, ignores)

ignores = collect(ignores)
args = Any[NoTangent() for _ in 1:length(xs)]
all(ignores) && return NoTangent()
all(ignores) && return (args...,)
sigargs = xs[.!ignores]
arginds = (1:length(xs))[.!ignores]
fd = j′vp(fdm, f2, ȳ, sigargs...)
Expand Down

0 comments on commit be9dbdb

Please sign in to comment.