Skip to content

Commit a7eca2d

Browse files
Merge pull request #198 from jClugstor/dir_docstrings
Update docstrings to document dir kwarg
2 parents b6aa8e4 + 9090dad commit a7eca2d

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

src/derivatives.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ end
150150
f,
151151
x::AbstractArray{<:Number},
152152
cache::DerivativeCache{T1,T2,fdtype,returntype};
153-
[epsilon_factor])
153+
relstep=default_relstep(fdtype, eltype(x)),
154+
absstep=relstep,
155+
dir=true)
154156
155157
Compute the derivative `df` of a scalar-valued map `f` at a collection of points `x`.
156158

src/gradients.jl

+8-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ end
120120
fdtype::Type{T1}=Val{:central},
121121
returntype::Type{T2}=eltype(x),
122122
inplace::Type{Val{T3}}=Val{true};
123-
[epsilon_factor])
123+
relstep=default_relstep(fdtype, eltype(x)),
124+
absstep=relstep,
125+
dir=true)
124126
125127
Gradients are either a vector->scalar map `f(x)`, or a scalar->vector map `f(fx,x)` if `inplace=Val{true}` and `fx=f(x)` if `inplace=Val{false}`.
126128
@@ -171,7 +173,8 @@ end
171173
fdtype::Type{T1}=Val{:central},
172174
returntype::Type{T2}=eltype(df),
173175
inplace::Type{Val{T3}}=Val{true};
174-
[epsilon_factor])
176+
relstep=default_relstep(fdtype, eltype(x)),
177+
absstep=relstep)
175178
176179
Gradients are either a vector->scalar map `f(x)`, or a scalar->vector map `f(fx,x)` if `inplace=Val{true}` and `fx=f(x)` if `inplace=Val{false}`.
177180
@@ -200,7 +203,9 @@ end
200203
f,
201204
x::AbstractArray{<:Number},
202205
cache::GradientCache;
203-
[epsilon_factor])
206+
relstep=default_relstep(fdtype, eltype(x)),
207+
absstep=relstep
208+
dir=true)
204209
205210
Gradients are either a vector->scalar map `f(x)`, or a scalar->vector map `f(fx,x)` if `inplace=Val{true}` and `fx=f(x)` if `inplace=Val{false}`.
206211

src/jacobians.jl

+6-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ end
152152
absstep=relstep,
153153
colorvec = 1:length(x),
154154
sparsity = nothing,
155-
jac_prototype = nothing)
155+
jac_prototype = nothing,
156+
dir=true)
156157
157158
Cache-less.
158159
"""
@@ -187,7 +188,8 @@ void_setindex!(args...) = (setindex!(args...); return)
187188
absstep=relstep,
188189
colorvec = cache.colorvec,
189190
sparsity = cache.sparsity,
190-
jac_prototype = nothing)
191+
jac_prototype = nothing,
192+
dir=true)
191193
192194
Cached.
193195
"""
@@ -399,7 +401,8 @@ end
399401
relstep=default_relstep(fdtype, eltype(x)),
400402
absstep=relstep,
401403
colorvec = cache.colorvec,
402-
sparsity = cache.sparsity)
404+
sparsity = cache.sparsity,
405+
dir=true)
403406
404407
Cached.
405408
"""

src/jvp.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ end
146146
v::AbstractArray{<:Number},
147147
cache::JVPCache;
148148
relstep=default_relstep(fdtype, eltype(x)),
149-
absstep=relstep,)
149+
absstep=relstep,
150+
dir=true)
150151
151152
Cached.
152153
"""

0 commit comments

Comments
 (0)