Skip to content

Nested slicing operations for merging blocks #466

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtfishman
Copy link
Collaborator

@mtfishman mtfishman commented Jun 25, 2025

Fixes #359.

This introduces a syntax A[[Block(1), Block(2)], [Block(1), Block(2)]] for merging blocks 1 and 2 into a "superblock" along each axis, and also adds some related block merge operations that also includes slicing subblocks such as A[[Block(1)[1:2], Block(2)[1:2]], [Block(1)[1:2], Block(2)[1:2]]]. The implementation is very similar to #445.

It feels unfortunate that these have to be done "by hand" through dispatch in this way as opposed to some more generic way of handling nested slices, but I can't think a better way (besides introducing a custom slicing operation).

Copy link

codecov bot commented Jun 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.70%. Comparing base (4059149) to head (de7ed6c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
+ Coverage   93.64%   93.70%   +0.06%     
==========================================
  Files          19       19              
  Lines        1667     1683      +16     
==========================================
+ Hits         1561     1577      +16     
  Misses        106      106              

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

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.

More convenient syntax for merging blocks
1 participant