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

[BlockSparseArrays] Fix nested slicing in Julia 1.11 #1575

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

mtfishman
Copy link
Member

Fixes an issue listed in ITensor/BlockSparseArrays.jl#2 that was noticed in #1539 (which was dealt with in that PR by marking tests as broken) that some nested slicing operations broke in Julia 1.11. I think the cause was that some of the reindexing logic in SubArray changed and lead to views being created which we weren't handling properly.

The fix here is to impose that for some of our specialized index/slice objects, indexing is always eager, even if you try to take a view. This may not be the best long term solution, and probably we should make the indexing logic more generic to handle slices that are views to begin with, but it seems like a reasonable fix for the time being.

@mtfishman mtfishman merged commit 99513c3 into main Nov 11, 2024
13 checks passed
@mtfishman mtfishman deleted the BlockSparseArray_nested_slicing_Julia_1.11 branch November 11, 2024 01:20
@mtfishman mtfishman changed the title [BlockSparseArrys] Fix nested slicing in Julia 1.11 [BlockSparseArrays] Fix nested slicing in Julia 1.11 Nov 11, 2024
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

Successfully merging this pull request may close these issues.

1 participant