Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slicing a BlockIndexRange with unit ranges doesn't return a BlockedIndexRange #355

Open
mtfishman opened this issue Mar 26, 2024 · 0 comments

Comments

@mtfishman
Copy link
Collaborator

For example:

julia> Block(1, 1)[1:4, 1:4]
4×4 BlockArrays.BlockIndexRange{2, Tuple{UnitRange{Int64}, UnitRange{Int64}}}:
 Block(1, 1)[1, 1]  Block(1, 1)[1, 2]  Block(1, 1)[1, 3]  Block(1, 1)[1, 4]
 Block(1, 1)[2, 1]  Block(1, 1)[2, 2]  Block(1, 1)[2, 3]  Block(1, 1)[2, 4]
 Block(1, 1)[3, 1]  Block(1, 1)[3, 2]  Block(1, 1)[3, 3]  Block(1, 1)[3, 4]
 Block(1, 1)[4, 1]  Block(1, 1)[4, 2]  Block(1, 1)[4, 3]  Block(1, 1)[4, 4]

julia> (Block(1, 1)[1:4, 1:4])[2:3, 2:3]
2×2 Matrix{BlockIndex{2}}:
 Block(1, 1)[2, 2]  Block(1, 1)[2, 3]
 Block(1, 1)[3, 2]  Block(1, 1)[3, 3]

while it could return Block(1, 1)[2:3, 2:3]. This would be helpful for implementing #346, among other applications.

@mtfishman mtfishman mentioned this issue Mar 26, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant