Repository navigation
Disambiguate Diagonal{<:LayoutVector} * OffDiagonal - #295
Merged
Merged
Conversation
…Diagonal with FillArrays#465 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #295 +/- ##
==========================================
+ Coverage 90.66% 90.74% +0.07%
==========================================
Files 12 12
Lines 2068 2106 +38
==========================================
+ Hits 1875 1911 +36
- Misses 193 195 +2 ☔ 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.
Companion to JuliaArrays/FillArrays.jl#465, which makes
Diagonal * OffDiagonalandOffDiagonal * Diagonalreturn anOffDiagonal. Those methods are ambiguous withso e.g.
Diagonal(BroadcastVector(exp, 1:5)) * OffDiagonal(Ones(4), 1)would become aMethodError. This adds the disambiguationswhich call the FillArrays implementation when it exists (so return an
OffDiagonal, and lazy/infinite bands stay lazy, e.g.Diagonal(BroadcastVector(exp, 1:∞)) * OffDiagonal(Ones(∞), 1, (oneto(∞), oneto(∞)))is anOffDiagonalwith aBroadcastArrayband), and otherwise fall back tomulas currently. So this works with both the released FillArrays and FillArrays#465, and the@staticcheck can be removed once the FillArrays compat is bumped past that release.Tested against released FillArrays 1.18.2 (
mulfallback) and against the FillArrays#465 branch (returnsOffDiagonal); both pass the full test suite including Aqua. Version bumped to 1.16.1.🤖 Generated with Claude Code