@@ -34,7 +34,7 @@ Integers are recognized as offsets, where `0` means no offsets are applied:
34
34
35
35
```jldoctest; setup=:(using OffsetArrays)
36
36
julia> A = OffsetArray(reshape(1:6, 2, 3), -1, -2)
37
- 2×3 OffsetArray(reshape(::UnitRange{Int64 }, 2, 3), 0:1, -1:1) with eltype Int64 with indices 0:1×-1:1:
37
+ 2×3 OffsetArray(reshape(::UnitRange{$Int }, 2, 3), 0:1, -1:1) with eltype $Int with indices 0:1×-1:1:
38
38
1 3 5
39
39
2 4 6
40
40
@@ -47,17 +47,17 @@ Examples of range-like types are: `Colon()`(aka `:`), `UnitRange`(e.g, `-1:2`),
47
47
48
48
```jldoctest; setup=:(using OffsetArrays)
49
49
julia> OffsetArray(reshape(1:6, 2, 3), 0:1, -1:1)
50
- 2×3 OffsetArray(reshape(::UnitRange{Int64 }, 2, 3), 0:1, -1:1) with eltype Int64 with indices 0:1×-1:1:
50
+ 2×3 OffsetArray(reshape(::UnitRange{$Int }, 2, 3), 0:1, -1:1) with eltype $Int with indices 0:1×-1:1:
51
51
1 3 5
52
52
2 4 6
53
53
54
54
julia> OffsetArray(reshape(1:6, 2, 3), :, -1:1) # : as a placeholder means no offset is applied at this dimension
55
- 2×3 OffsetArray(reshape(::UnitRange{Int64 }, 2, 3), 1:2, -1:1) with eltype Int64 with indices 1:2×-1:1:
55
+ 2×3 OffsetArray(reshape(::UnitRange{$Int }, 2, 3), 1:2, -1:1) with eltype $Int with indices 1:2×-1:1:
56
56
1 3 5
57
57
2 4 6
58
58
59
59
julia> OffsetArray(reshape(1:6, 2, 3), CartesianIndex(0, -1):CartesianIndex(1, 1))
60
- 2×3 OffsetArray(reshape(::UnitRange{Int64 }, 2, 3), 0:1, -1:1) with eltype Int64 with indices 0:1×-1:1:
60
+ 2×3 OffsetArray(reshape(::UnitRange{$Int }, 2, 3), 0:1, -1:1) with eltype $Int with indices 0:1×-1:1:
61
61
1 3 5
62
62
2 4 6
63
63
```
@@ -77,12 +77,12 @@ ERROR: [...]
77
77
julia> a = [1 2; 3 4];
78
78
79
79
julia> OffsetArray(a, OffsetArrays.Origin(0, 1))
80
- 2×2 OffsetArray(::$(Array{Int64 ,2 }) , 0:1, 1:2) with eltype Int64 with indices 0:1×1:2:
80
+ 2×2 OffsetArray(::$(Array{Int ,2 }) , 0:1, 1:2) with eltype $Int with indices 0:1×1:2:
81
81
1 2
82
82
3 4
83
83
84
84
julia> OffsetArray(a, OffsetArrays.Origin(0)) # short notation for `Origin(0, ..., 0)`
85
- 2×2 OffsetArray(::$(Array{Int64 , 2 }) , 0:1, 0:1) with eltype Int64 with indices 0:1×0:1:
85
+ 2×2 OffsetArray(::$(Array{Int , 2 }) , 0:1, 0:1) with eltype $Int with indices 0:1×0:1:
86
86
1 2
87
87
3 4
88
88
```
@@ -357,15 +357,15 @@ specific to remove a level of indirection when applicable.
357
357
julia> A = [1 3 5; 2 4 6];
358
358
359
359
julia> O = OffsetArray(A, 0:1, -1:1)
360
- 2×3 OffsetArray(::Matrix{Int64} , 0:1, -1:1) with eltype Int64 with indices 0:1×-1:1:
360
+ 2×3 OffsetArray(::$( Matrix{Int}) , 0:1, -1:1) with eltype $Int with indices 0:1×-1:1:
361
361
1 3 5
362
362
2 4 6
363
363
364
364
julia> OffsetArrays.no_offset_view(O)[1,1] = -9
365
365
-9
366
366
367
367
julia> A
368
- 2×3 Matrix{Int64} :
368
+ 2×3 $( Matrix{Int}) :
369
369
-9 3 5
370
370
2 4 6
371
371
```
0 commit comments