Repository navigation
Fix bandwidths of blocks of banded matrices - #252
Merged
Merged
Conversation
bandwidths(view(A, Block(K), Block(J))) returned subblockbandwidths(A) for any parent, ignoring the offset of the block from the diagonal. For a banded (not block-banded) parent this was inconsistent with bandeddata, so indexing off-diagonal blocks threw a BoundsError, and for lazy infinite banded matrices it called subblockbandwidths, which fails on infinite axes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #252 +/- ##
==========================================
+ Coverage 90.76% 90.79% +0.03%
==========================================
Files 11 11
Lines 1169 1173 +4
==========================================
+ Hits 1061 1065 +4
Misses 108 108 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bandwidths(view(A, Block(K), Block(J)))returnedsubblockbandwidths(A)for anyA, ignoring the offset of the block from the diagonal. For a banded (not block-banded) parent with blocked axes, this disagrees withbandeddataof the view, so indexing an off-diagonal block threw:For lazy infinite banded matrices, such as products in ClassicalOrthogonalPolynomials/DeRhamOrthogonalPolynomials,
A[Block(3,2)]failed instead, becausesubblockbandwidthsis computed from the maximum block size of an infinite axis.Now, when the parent has an
AbstractBandedLayout, the bandwidths are the parent's bandwidths shifted by the block's offset from the diagonal, as for unit-range views in BandedMatrices.DiagonalLayoutparents keep the previous behaviour, which the existing tests rely on.🤖 Generated with Claude Code