Skip to content

Commit 87e0a26

Browse files
authored
typos (#238)
1 parent 148c564 commit 87e0a26

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/deprecated.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ end
88
"""
99
rand_tangent([rng::AbstractRNG,] x)
1010
11-
Returns a arbitary tangent vector _appropriate_ for the primal value `x`.
11+
Returns an arbitrary tangent vector _appropriate_ for the primal value `x`.
1212
Note that despite the name, no promises on the statistical randomness are made.
13-
Rather it is an arbitary value, that is generated using the `rng`.
13+
Rather it is an arbitrary value, that is generated using the `rng`.
1414
"""
1515
rand_tangent(x) = rand_tangent(Random.GLOBAL_RNG, x)
1616

src/methods.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ difference method, `bound_estimator`, will be tasked with estimating the `P`th o
6767
derivative in a _neighbourhood_, not just at some `x`. To do this, it will use a careful
6868
reweighting of the function evaluations to estimate the `P`th order derivative at, in the
6969
case of a central method, `x - h`, `x`, and `x + h`, where `h` is the step size. The
70-
coeffients for this estimate, the _neighbourhood estimate_, are given by the three sets of
71-
coeffients in `bound_estimator.coefs_neighbourhood`. The round-off error is estimated by the
72-
round-off error of the function evaluations performed by `bound_estimator`. The trunction
70+
coefficients for this estimate, the _neighbourhood estimate_, are given by the three sets of
71+
coefficients in `bound_estimator.coefs_neighbourhood`. The round-off error is estimated by the
72+
round-off error of the function evaluations performed by `bound_estimator`. The truncation
7373
error is amplified by `condition`, and the round-off error is amplified by `factor`. The
7474
quantities `∇f_magnitude_mult` and `f_error_mult` are precomputed quantities that facilitate
7575
the step size adaptation procedure.
@@ -490,7 +490,7 @@ for direction in [:forward, :central, :backward]
490490
geom::Bool=false
491491
)
492492
493-
Contruct a finite difference method at a $($(Meta.quot(direction))) grid of `p` points.
493+
Construct a finite difference method at a $($(Meta.quot(direction))) grid of `p` points.
494494
495495
# Arguments
496496
- `p::Int`: Number of grid points.

src/to_vec.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ end
196196

197197
function to_vec(x::F) where {F <: SVD}
198198
# Convert the vector S to a matrix so we can work with a vector of matrices
199-
# only and inferrence work
199+
# only and inference work
200200
v = [x.U, reshape(x.S, length(x.S), 1), x.Vt]
201201
x_vec, back = to_vec(v)
202202
function SVD_from_vec(v)
@@ -216,7 +216,7 @@ end
216216

217217
function to_vec(x::S) where {U, S <: Union{LinearAlgebra.QRCompactWYQ{U}, LinearAlgebra.QRCompactWY{U}}}
218218
# x.T is composed of upper triangular blocks. The subdiagonals elements
219-
# of the blocks are abitrary. We make sure to set all of them to zero
219+
# of the blocks are arbitrary. We make sure to set all of them to zero
220220
# to avoid NaN.
221221
blocksize, cols = size(x.T)
222222
T = zeros(U, blocksize, cols)

test/deprecated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ rand_tangent(args...) = @test_deprecated FiniteDifferences.rand_tangent(args...)
102102
)
103103
end
104104

105-
@testset "compsition of addition" begin
105+
@testset "composition of addition" begin
106106
x = Foo(1.5, 2, Foo(1.1, 3, [1.7, 1.4, 0.9]))
107107
@test x + rand_tangent(x) isa typeof(x)
108108
@test x + (rand_tangent(x) + rand_tangent(x)) isa typeof(x)

test/grad.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ using FiniteDifferences: grad, jacobian, _jvp, jvp, j′vp, _j′vp, to_vec
6161
@test _jvp(fdm, f, x, ẋ) J_exact *
6262
@test _j′vp(fdm, f, ȳ, x) transpose(J_exact) *
6363

64-
# Check that no mutation occured that wasn't reverted.
64+
# Check that no mutation occurred that wasn't reverted.
6565
@test xc == x
6666
end
6767

test/to_vec.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ end
146146
test_to_vec(cholesky(P))
147147

148148
# Special treatment for QR since it is represented by a matrix
149-
# with some arbirtrary values.
149+
# with some arbitrary values.
150150
F = qr(M)
151151
@inferred to_vec(F)
152152
F_vec, back = to_vec(F)

0 commit comments

Comments
 (0)