Skip to content

Conversation

@mtfishman
Copy link
Collaborator

@mtfishman mtfishman commented Jul 15, 2025

Introduce BlockIndices that generalizes BlockIndexRange to non-contiguous slicing, such as A[Block(2)[[1, 3]]]. BlockIndexRange is now a type alias for BlockIndices when the indices are unit ranges. Closes #419. Split off from #462.

@codecov
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.46%. Comparing base (2f61a7d) to head (ae53d93).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #483      +/-   ##
==========================================
+ Coverage   94.05%   94.46%   +0.40%     
==========================================
  Files          19       19              
  Lines        1765     1769       +4     
==========================================
+ Hits         1660     1671      +11     
+ Misses        105       98       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dlfivefifty dlfivefifty merged commit d0e0e27 into JuliaArrays:master Oct 23, 2025
17 checks passed
dlfivefifty pushed a commit that referenced this pull request Oct 30, 2025
The current definition of `size(iter::BlockIndices)` was assuming the
indices were ranges (resulting from #483 where `BlockIndexRange` was
generalized to `BlockIndices` but the definition if `size` wasn't
updated accordingly), so for (non-contiguous) non-ranges it was giving
the wrong result, this PR fixes that. Additionally, previously only
`size` was defined which meant that BlockIndices where the indices had
non-trivial axes (like blocked axes) lost information, which is now
fixed and tested.
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.

Steprange indexing with Block not working

2 participants