Repository navigation
OffDiagonal: Use dense broadcast when other arrays take part - #460
Merged
dlfivefifty merged 1 commit intoOct 26, 2026
Merged
dlfivefifty merged 1 commit into
dlfivefifty merged 1 commit into
Conversation
Newer LinearAlgebra (JuliaLang/LinearAlgebra.jl#1549) treats `*` as zero preserving whatever its other arguments are, so `A .* M` for an `OffDiagonal` `A` and a dense `M` took the band path. That path broadcasts the band against `M` directly, which throws a `DimensionMismatch`. Only take the band path when every other argument is a scalar or a zero-dimensional array. 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 #460 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 11
Lines 1316 1393 +77
=========================================
+ Hits 1316 1393 +77 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
dlfivefifty
pushed a commit
that referenced
this pull request
Oct 26, 2026
I'm just opening this to help the process. No urgency, but it would be good to get this working on PkgEval. Claude: --- Bumps the version to 1.18.2 so the unreleased fixes on master get registered: - #460: `OffDiagonal` broadcasting with other arrays. Releasing it fixes the PkgEval failures of FillArrays and ArrayLayouts on Julia nightly (1.15-DEV), failing since 2026-10-14 after JuliaLang/LinearAlgebra.jl#1549. - #459: faster `sparse` for `RectDiagonal` and `OffDiagonal` (no new API, so a patch release). Written with Claude Code (Opus 5.5). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Claude:
Fixes the PkgEval failure of FillArrays on Julia nightly (1.15-DEV), and the
OffDiagonal mulfailures in ArrayLayouts' tests.Since JuliaLang/LinearAlgebra.jl#1549,
*counts as zero-preserving whatever its other arguments are, so theOffDiagonalbroadcasting from #458 sendsA .* M(withMa dense array) down the band path. That broadcasts the band againstMand throws aDimensionMismatch, or aMethodErrorwhen the result is a matrix.This only takes the band path when every other argument is a scalar or a zero-dimensional array. ArrayLayouts hits it through
diag .* OandO .* permutedims(diag)for a non-squareOffDiagonal, which the added tests cover.Written with Claude Code (Opus 5.5).