Skip to content

Commit be9dbdb

Browse files
author
Miha Zgubic
committed
return all the args
1 parent daea9aa commit be9dbdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/finite_difference_calls.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function _make_jvp_call(fdm, f, y, xs, ẋs, ignores)
1919
f2 = _wrap_function(f, xs, ignores)
2020

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

4646
ignores = collect(ignores)
4747
args = Any[NoTangent() for _ in 1:length(xs)]
48-
all(ignores) && return NoTangent()
48+
all(ignores) && return (args...,)
4949
sigargs = xs[.!ignores]
5050
arginds = (1:length(xs))[.!ignores]
5151
fd = j′vp(fdm, f2, ȳ, sigargs...)

0 commit comments

Comments
 (0)