Skip to content

Commit 98db703

Browse files
authored
Document N type parameter of SArray and MArray (#712)
1 parent 4f93bf6 commit 98db703

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/MArray.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"""
2-
MArray{S, T, L}(undef)
3-
MArray{S, T, L}(x::NTuple{L, T})
4-
MArray{S, T, L}(x1, x2, x3, ...)
2+
MArray{S, T, N, L}(undef)
3+
MArray{S, T, N, L}(x::NTuple{L})
4+
MArray{S, T, N, L}(x1, x2, x3, ...)
55
66
77
Construct a statically-sized, mutable array `MArray`. The data may optionally be
88
provided upon construction and can be mutated later. The `S` parameter is a Tuple-type
99
specifying the dimensions, or size, of the array - such as `Tuple{3,4,5}` for a 3×4×5-sized
10-
array. The `L` parameter is the `length` of the array and is always equal to `prod(S)`.
11-
Constructors may drop the `L` and `T` parameters if they are inferrable from the input
12-
(e.g. `L` is always inferrable from `S`).
10+
array. The `N` parameter is the dimension of the array; the `L` parameter is the `length`
11+
of the array and is always equal to `prod(S)`. Constructors may drop the `L`, `N` and `T`
12+
parameters if they are inferrable from the input (e.g. `L` is always inferrable from `S`).
1313
1414
MArray{S}(a::Array)
1515

src/SArray.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
SArray{S, T, L}(x::NTuple{L, T})
3-
SArray{S, T, L}(x1, x2, x3, ...)
2+
SArray{S, T, N, L}(x::NTuple{L})
3+
SArray{S, T, N, L}(x1, x2, x3, ...)
44
55
Construct a statically-sized array `SArray`. Since this type is immutable, the data must be
66
provided upon construction and cannot be mutated later. The `S` parameter is a Tuple-type
77
specifying the dimensions, or size, of the array - such as `Tuple{3,4,5}` for a 3×4×5-sized
8-
array. The `L` parameter is the `length` of the array and is always equal to `prod(S)`.
9-
Constructors may drop the `L` and `T` parameters if they are inferrable from the input
10-
(e.g. `L` is always inferrable from `S`).
8+
array. The `N` parameter is the dimension of the array; the `L` parameter is the `length`
9+
of the array and is always equal to `prod(S)`. Constructors may drop the `L`, `N` and `T`
10+
parameters if they are inferrable from the input (e.g. `L` is always inferrable from `S`).
1111
1212
SArray{S}(a::Array)
1313

0 commit comments

Comments
 (0)