Skip to content

Commit 07d6cf3

Browse files
committed
Whitespace changes
1 parent 10a7b28 commit 07d6cf3

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/OffsetArrays.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ const ArrayInitializer = Union{UndefInitializer, Missing, Nothing}
2424
OffsetArray(A, indices...)
2525
2626
Return an `AbstractArray` that shares element type and size with the first argument but
27-
uses the supplied `indices` to infer its axes. If all the indices are `AbstractUnitRange`s then
28-
these are directly used as the axis span along each dimension. Refer to the examples below for other
27+
uses the supplied `indices` to infer its axes. If all the indices are `AbstractUnitRange`s then
28+
these are directly used as the axis span along each dimension. Refer to the examples below for other
2929
permissible types.
3030
31-
Alternatively it's possible to specify the coordinates of one corner of the array
32-
and have the axes be computed automatically from the size of `A`.
31+
Alternatively it's possible to specify the coordinates of one corner of the array
32+
and have the axes be computed automatically from the size of `A`.
3333
This constructor makes it convenient to shift to
34-
an arbitrary starting index along each axis, for example to a zero-based indexing scheme followed by
34+
an arbitrary starting index along each axis, for example to a zero-based indexing scheme followed by
3535
arrays in languages such as C and Python.
3636
See [`Origin`](@ref) and the examples below for this usage.
3737
@@ -51,9 +51,9 @@ julia> A[0, 1]
5151
5
5252
```
5353
54-
Examples of range-like types are: `UnitRange` (e.g, `-1:2`), `CartesianIndices`,
55-
and `Colon()` (or concisely `:`). A `UnitRange` specifies the axis span along one particular dimension,
56-
`CartesianIndices` specify the axis spans along multiple dimensions, and a `Colon` is a placeholder
54+
Examples of range-like types are: `UnitRange` (e.g, `-1:2`), `CartesianIndices`,
55+
and `Colon()` (or concisely `:`). A `UnitRange` specifies the axis span along one particular dimension,
56+
`CartesianIndices` specify the axis spans along multiple dimensions, and a `Colon` is a placeholder
5757
that specifies that the `OffsetArray` shares its axis with its parent along that dimension.
5858
5959
```jldoctest; setup=:(using OffsetArrays)
@@ -86,9 +86,9 @@ ERROR: [...]
8686
8787
# Example: origin
8888
89-
[`OffsetArrays.Origin`](@ref) may be used to specify the origin of the OffsetArray. The term origin here
90-
refers to the corner with the lowest values of coordinates, such as the left edge for an `AbstractVector`,
91-
the bottom left corner for an `AbstractMatrix` and so on. The coordinates of the origin sets the starting
89+
[`OffsetArrays.Origin`](@ref) may be used to specify the origin of the OffsetArray. The term origin here
90+
refers to the corner with the lowest values of coordinates, such as the left edge for an `AbstractVector`,
91+
the bottom left corner for an `AbstractMatrix` and so on. The coordinates of the origin sets the starting
9292
index of the array along each dimension.
9393
9494
```jldoctest; setup=:(using OffsetArrays)
@@ -150,7 +150,7 @@ end
150150
OffsetArray{eltype(A), ndims(A), typeof(A)}(A, offsets)
151151
end
152152

153-
# These methods are necessary to disallow incompatible dimensions for
153+
# These methods are necessary to disallow incompatible dimensions for
154154
# the OffsetVector and the OffsetMatrix constructors
155155
for (FT, ND) in ((:OffsetVector, :1), (:OffsetMatrix, :2))
156156
@eval @inline function $FT(A::AbstractArray{<:Any,$ND}, offsets::Tuple{Vararg{Integer}})
@@ -185,7 +185,7 @@ for FT in (:OffsetArray, :OffsetVector, :OffsetMatrix)
185185
lA = size(A)
186186
lI = map(length, inds)
187187
lA == lI || throw_dimerr(lA, lI)
188-
$FT(A, map(_offset, axes(A), inds))
188+
$FT(A, map(_offset, axes(A), inds))
189189
end
190190

191191
@eval @inline $FT(A::AbstractArray, inds::Vararg) = $FT(A, inds)
@@ -372,7 +372,7 @@ function Base.inds2string(inds::Tuple{Vararg{Union{IdOffsetRange, IdentityUnitRa
372372
Base.inds2string(map(UnitRange, inds))
373373
end
374374
Base.showindices(io::IO, ind1::IdOffsetRange, inds::IdOffsetRange...) = Base.showindices(io, map(UnitRange, (ind1, inds...))...)
375-
375+
376376
function Base.showarg(io::IO, a::OffsetArray, toplevel)
377377
print(io, "OffsetArray(")
378378
Base.showarg(io, parent(a), false)

0 commit comments

Comments
 (0)