Open
Description
Indexing with UnitRange
does not preserve the blocking of blocked arrays:
julia> using BlockArrays
julia> r = blockedrange([2, 4])
2-blocked 6-element BlockedUnitRange{Int64, Vector{Int64}}:
1
2
─
3
4
5
6
julia> r[2:4]
2:4
and:
julia> a = BlockArray(randn(4, 4), [2, 2], [2, 2])
2×2-blocked 4×4 BlockMatrix{Float64}:
0.372344 -0.735109 │ 0.316133 -0.935035
2.37641 1.30943 │ -0.931113 0.339143
──────────────────────┼──────────────────────
0.422144 0.839572 │ -1.4721 -0.74205
0.0436636 -0.722946 │ 0.799941 -0.192523
julia> a[2:3, 2:3]
2×2 Matrix{Float64}:
1.30943 -0.931113
0.839572 -1.4721
It would be nice to have convenient functionality for indexing with UnitRange
that does preserve blocking.
Metadata
Metadata
Assignees
Labels
No labels