Skip to content

Commit 7e5aef0

Browse files
committed
Fix doc errors
1 parent 293ba26 commit 7e5aef0

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

docs/src/man/blockarrays.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,9 @@ julia> block_array = BlockArray{Float64}(undef_blocks, [1,2], [2,2])
9999
#undef #undef │ #undef #undef
100100
101101
julia> block_array[Block(2,1)] = rand(2,2)
102-
2×2-blocked 3×4 BlockArray{Float64,2}:
103-
#undef #undef │ #undef #undef
104-
────────────────────────┼────────────────
105-
0.590845 0.566237 │ #undef #undef
106-
0.766797 0.460085 │ #undef #undef
102+
2×2 Array{Float64,2}:
103+
0.590845 0.566237
104+
0.766797 0.460085
107105
108106
julia> block_array[Block(1),Block(1)] = [1 2];
109107

src/blockarray.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ Constructs a `BlockArray` with uninitialized blocks from a block type `R` with s
102102
```jldoctest; setup = quote using BlockArrays end
103103
julia> BlockArray(undef_blocks, Matrix{Float64}, [1,3], [2,2])
104104
2×2-blocked 4×4 BlockArray{Float64,2}:
105-
#undef │ #undef #undef #undef
106-
--------┼--------------------------┼
107-
#undef │ #undef #undef #undef
108-
#undef │ #undef #undef #undef
109-
--------┼--------------------------┼
110-
#undef │ #undef #undef #undef
105+
#undef │ #undef #undef #undef
106+
--------┼------------------------
107+
#undef │ #undef #undef #undef
108+
#undef │ #undef #undef #undef
109+
--------┼------------------------
110+
#undef │ #undef #undef #undef
111111
```
112112
"""
113113
@inline BlockArray(::UndefBlocksInitializer, ::Type{R}, block_sizes::Vararg{AbstractVector{Int}, N}) where {T, N, R<:AbstractArray{T,N}} =

src/blockaxis.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ julia> A = BlockArray([1,2,3],[2,1])
9595
3
9696
9797
julia> blockaxes(A)[1]
98-
2-element BlockRange{1,Tuple{UnitRange{Int64}}}:
98+
2-element BlockRange{1,Tuple{Base.OneTo{Int64}}}:
9999
Block(1)
100100
Block(2)
101101
```
@@ -116,7 +116,7 @@ julia> A = BlockArray([1,2,3],[2,1])
116116
3
117117
118118
julia> blockaxes(A,1)
119-
2-element BlockRange{1,Tuple{UnitRange{Int64}}}:
119+
2-element BlockRange{1,Tuple{Base.OneTo{Int64}}}:
120120
Block(1)
121121
Block(2)
122122
```

src/blockbroadcast.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ julia> for idx in SubBlockIterator(subblock_lasts, block_lasts)
8181
idx.block :: Block{1}
8282
idx.indices :: Tuple{UnitRange}
8383
end
84-
view(A, idx) = [1]
85-
view(A, idx) = [2, 3]
86-
view(A, idx) = [4]
87-
view(A, idx) = [5, 6]
84+
view(A, idx) = 1:1
85+
view(A, idx) = 2:3
86+
view(A, idx) = 4:4
87+
view(A, idx) = 5:6
8888
8989
julia> [idx.block.n[1] for idx in SubBlockIterator(subblock_lasts, block_lasts)]
9090
4-element Array{Int64,1}:

0 commit comments

Comments
 (0)