Skip to content

Commit 6117155

Browse files
committed
Fix typos in documentation
1 parent 6db1d48 commit 6117155

File tree

12 files changed

+30
-23
lines changed

12 files changed

+30
-23
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AxisIndices"
22
uuid = "f52c9ee2-1b1c-4fd8-8546-6350938c7f11"
33
authors = ["Tokazama <[email protected]>"]
4-
version = "0.3.8"
4+
version = "0.3.9"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

docs/src/axis.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,3 @@ However, it's still a little over twice as slow as normal indexing.
147147
That's largely because of the cost of searching `1.0:4.0` (which is a `StepRangeLen` type in this case).
148148
The second benchmark demonstrates how close we really are to standard indexing given similar range types.
149149

150-
## Resizing Axes
151-
152-
These methods help with operations that need to resize axes, either dynamically or by creating a new instance of an axis. In addition to helping with operations related to array resizing, these may be useful for managing the axis of a vector throughout a `push!`, `pushfirst!`, `pop`, and `popfirst!` operation.
153-

docs/src/compatibility.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ In other words, the current version can only support multi-mapping multiple `Abs
1313

1414
## NamedDims
1515

16-
[NamedDims.jl](https://github.com/invenia/NamedDims.jl)
16+
Indexing via named dimensions is supported via the [NamedDims.jl](https://github.com/invenia/NamedDims.jl) package.
17+
[`NIArray`](@ref) assists in constructing arrays that have both named dimensions and a subtype of `AbstractAxis` along each axis.
1718

1819
## OffsetArrays
1920

docs/src/internal_api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ AxisIndices.is_key
4141
AxisIndices.to_index
4242
AxisIndices.to_keys
4343
AxisIndices.get_factorization
44+
AxisIndices.is_simple_axis
45+
4446
```

docs/src/internals_of_indexing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ Therefore, new subtypes of `AxisIndicesStyle` must define a `to_index` and `to_k
6767

6868

6969
[^1]: There's absolutely no functionality provided from `Base.to_index` that isn't already available with `AxisIndices.to_index`. Providing a seperate implementation is meant to avoid causing any unecessary ambiguities in this or any other packages that may be simultaneously loaded.
70-
[^2]: Why do we need the `index` produced in the previous `to_index` method to reconstruct keys? Technically we don't, but it allows use to avoid looking up indices a second time and ensuring they are inbounds.
70+
[^2]: Why do we need the `index` produced in the previous `to_index` method to reconstruct keys? Technically we don't, but it avoids looking up indices a second time and ensuring they are inbounds.
7171
[^3]: It is at this point that `unsafe_reconstruct` is called. This is only important to know if you want to create a new axis type that has keys that require some unique procedure to reconstruct.

docs/src/standard_library_api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ rot180
66
rotr90
77
rotl90
88
deleteat!
9+
reshape
910
svd
1011
qr
1112
lu

src/AxisCore/reduce.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
"""
23
reduce_axis(axis[, new_indics]) -> AbstractAxis
34

src/AxisCore/reshape.jl

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
#=
21
"""
2+
reshape(A::AbstractAxisIndices, shape)
3+
4+
Reshape the array and axes of `A`.
5+
6+
## Examples
37
```jldoctest
8+
julia> using AxisIndices
9+
410
julia> A = reshape(AxisIndicesArray(Vector(1:8), [:a, :b, :c, :d, :e, :f, :g, :h]), 4, 2);
511
612
julia> axes(A)
7-
(Axis([:a, :b, :c, :d]), SimpleAxis(OneTo(2)))
13+
(Axis([:a, :b, :c, :d] => Base.OneTo(4)), SimpleAxis(Base.OneTo(2)))
814
915
julia> axes(reshape(A, 2, :))
10-
(Axis([:a, :b]), SimpleAxis(OneTo(4)))
16+
(Axis([:a, :b] => Base.OneTo(2)), SimpleAxis(Base.OneTo(4)))
17+
```
1118
"""
12-
=#
13-
#=
14-
function Base.reshape(A::AbstractAxisIndices, shp::Tuple{Vararg{Union{Colon, Int64},N}}) where {N}
15-
p = reshape(parent(A), shp)
16-
return unsafe_reconstruct(A, p, reshape_axes(A, axes(p)))
17-
end
18-
=#
19-
2019
function Base.reshape(A::AbstractAxisIndices, shp::NTuple{N,Int}) where {N}
2120
p = reshape(parent(A), shp)
2221
return unsafe_reconstruct(A, p, reshape_axes(naxes(A, Val(N)), axes(p)))

src/Math/lu.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ julia> keys.(axes(F.L * F.U))
3232
```
3333
""" lu
3434

35-
function LinearAlgebra.lu!(a::AxisIndicesArray, args...; kwargs...)
36-
inner_lu = lu!(parent(a), args...; kwargs...)
35+
function LinearAlgebra.lu!(A::AbstractAxisIndices, args...; kwargs...)
36+
inner_lu = lu!(parent(A), args...; kwargs...)
3737
return LU(
38-
AxisIndicesArray(getfield(inner_lu, :factors), axes(a)),
38+
unsafe_reconstruct(A, getfield(inner_lu, :factors), axes(A)),
3939
getfield(inner_lu, :ipiv),
4040
getfield(inner_lu, :info)
4141
)

src/Math/svd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function LinearAlgebra.svd(A::AbstractAxisIndices, args...; kwargs...)
3434
return AxisIndicesSVD(svd(parent(A), args...; kwargs...), A)
3535
end
3636

37-
function LinearAlgebra.svd!(A::AxisIndicesArray, args...; kwargs...)
37+
function LinearAlgebra.svd!(A::AbstractAxisIndices, args...; kwargs...)
3838
return AxisIndicesSVD(svd!(parent(A), args...; kwargs...), A)
3939
end
4040

0 commit comments

Comments
 (0)