Skip to content

Conversation

@mtfishman
Copy link
Collaborator

@mtfishman mtfishman commented 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.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.53%. Comparing base (7ebbea7) to head (0da26a3).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #490   +/-   ##
=======================================
  Coverage   94.52%   94.53%           
=======================================
  Files          19       19           
  Lines        1789     1810   +21     
=======================================
+ Hits         1691     1711   +20     
- Misses         98       99    +1     

☔ 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.

@mtfishman
Copy link
Collaborator Author

@dlfivefifty @jishnub I'll merge this tomorrow unless I hear back from you earlier, I think the definition is uncontroversial and it would be a nasty silent bug to hit.

@dlfivefifty dlfivefifty merged commit a1f2273 into JuliaArrays:master Oct 30, 2025
18 checks passed
@dlfivefifty
Copy link
Member

I merged it.

I take the view that if (1) nothing downstream is broken and (2) you are confident the changes are good/correct; then please feel free to just merge and tag without review. We can always revert a change if it turns out to be a problem (which often involves adding another downstream test where the problem was detected).

@mtfishman mtfishman deleted the mf/blockindices_axes branch October 30, 2025 12:39
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.

2 participants