@@ -19,7 +19,7 @@ function _make_jvp_call(fdm, f, y, xs, ẋs, ignores)
19
19
f2 = _wrap_function (f, xs, ignores)
20
20
21
21
ignores = collect (ignores)
22
- all (ignores) && return ntuple (_ -> nothing , length (xs))
22
+ all (ignores) && return ntuple (_ -> NoTangent () , length (xs))
23
23
sigargs = zip (xs[.! ignores], ẋs[.! ignores])
24
24
return _maybe_fix_to_composite (y, jvp (fdm, f2, sigargs... ))
25
25
end
@@ -35,7 +35,7 @@ Call `FiniteDifferences.j′vp`, with the option to ignore certain `xs`.
35
35
- `ȳ`: The adjoint w.r.t. output of `f`.
36
36
- `xs`: Inputs to `f`, such that `y = f(xs...)`.
37
37
- `ignores`: Collection of `Bool`s, the same length as `xs`.
38
- If `ignores[i] === true`, then `xs[i]` is ignored; `∂xs[i] === nothing `.
38
+ If `ignores[i] === true`, then `xs[i]` is ignored; `∂xs[i] === NoTangent() `.
39
39
40
40
# Returns
41
41
- `∂xs::Tuple`: Derivatives estimated by finite differencing.
@@ -44,7 +44,7 @@ function _make_j′vp_call(fdm, f, ȳ, xs, ignores)
44
44
f2 = _wrap_function (f, xs, ignores)
45
45
46
46
ignores = collect (ignores)
47
- args = Any[nothing for _ in 1 : length (xs)]
47
+ args = Any[NoTangent () for _ in 1 : length (xs)]
48
48
all (ignores) && return (args... ,)
49
49
sigargs = xs[.! ignores]
50
50
arginds = (1 : length (xs))[.! ignores]
@@ -66,7 +66,7 @@ Return a new version of `f`, `fnew`, that ignores some of the arguments `xs`.
66
66
- `f`: The function to be wrapped.
67
67
- `xs`: Inputs to `f`, such that `y = f(xs...)`.
68
68
- `ignores`: Collection of `Bool`s, the same length as `xs`.
69
- If `ignores[i] === true`, then `xs[i]` is ignored; `∂xs[i] === nothing `.
69
+ If `ignores[i] === true`, then `xs[i]` is ignored; `∂xs[i] === NoTangent() `.
70
70
"""
71
71
function _wrap_function (f, xs, ignores)
72
72
function fnew (sigargs... )
0 commit comments