Skip to content

Commit 9090dad

Browse files
committedFeb 7, 2025·
update docstrings
1 parent 92870f8 commit 9090dad

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
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

+7-4
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ 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,
124125
dir=true)
125126
126127
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}`.
@@ -172,7 +173,8 @@ end
172173
fdtype::Type{T1}=Val{:central},
173174
returntype::Type{T2}=eltype(df),
174175
inplace::Type{Val{T3}}=Val{true};
175-
[epsilon_factor])
176+
relstep=default_relstep(fdtype, eltype(x)),
177+
absstep=relstep)
176178
177179
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}`.
178180
@@ -201,8 +203,9 @@ end
201203
f,
202204
x::AbstractArray{<:Number},
203205
cache::GradientCache;
204-
dir=true
205-
[epsilon_factor])
206+
relstep=default_relstep(fdtype, eltype(x)),
207+
absstep=relstep
208+
dir=true)
206209
207210
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}`.
208211

0 commit comments

Comments
 (0)
Please sign in to comment.