Skip to content

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Aug 24, 2025

For example, after this PR,

julia> D = Diagonal(1:4)
4×4 Diagonal{Int64, UnitRange{Int64}}:
 1      
   2    
     3  
       4

julia> D .* 2
4×4 Diagonal{Int64, StepRangeLen{Int64, Int64, Int64, Int64}}:
 2      
   4    
     6  
       8

julia> using SparseArrays

julia> D = Diagonal(spzeros(2))
2×2 Diagonal{Float64, SparseVector{Float64, Int64}}:
 0.0    
     0.0

julia> D .* 2
2×2 Diagonal{Float64, SparseVector{Float64, Int64}}:
 0.0    
     0.0

julia> using FillArrays

julia> D = Diagonal(Fill(3, 2))
2×2 Diagonal{Int64, Fill{Int64, 1, Tuple{Base.OneTo{Int64}}}}:
 3  
   3

julia> D .* 2
2×2 Diagonal{Int64, Fill{Int64, 1, Tuple{Base.OneTo{Int64}}}}:
 6  
   6

I've not handled the other banded matrix types in this PR, but Diagonal is probably used far more commonly in packages anyway.

Copy link

codecov bot commented Aug 24, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.88%. Comparing base (ed53855) to head (5898006).

Files with missing lines Patch % Lines
src/structuredbroadcast.jl 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1423      +/-   ##
==========================================
- Coverage   93.88%   93.88%   -0.01%     
==========================================
  Files          34       34              
  Lines       15891    15899       +8     
==========================================
+ Hits        14920    14927       +7     
- Misses        971      972       +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.

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.

1 participant