Skip to content
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

BroadcastStyle for RectDiagonal #275

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jul 10, 2023

This hooks into some of the functionality for structured matrices in LinearAlgebra, and assuages some of the concerns raised in #265. After this, sparsity is often preserved when broadcasting over a RectDiagonal:

julia> E = Eye(2,4)
2×4 Eye{Float64}

julia> 2E
2×4 FillArrays.RectDiagonal{Float64, Vector{Float64}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}:
 2.0            
     2.0        

julia> E .+ 1
2×4 Matrix{Float64}:
 2.0  1.0  1.0  1.0
 1.0  2.0  1.0  1.0

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #275 (08b33e1) into master (6122f5a) will increase coverage by 95.53%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #275       +/-   ##
===========================================
+ Coverage    0.00%   95.53%   +95.53%     
===========================================
  Files           5        5               
  Lines         849      852        +3     
===========================================
+ Hits            0      814      +814     
+ Misses        849       38      -811     
Impacted Files Coverage Δ
src/FillArrays.jl 96.51% <100.00%> (+96.51%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dlfivefifty
Copy link
Member

Perhaps this warrants v1.1 as its a "new feature"?

@jishnub
Copy link
Member Author

jishnub commented Jul 10, 2023

Yes, this may go in the upcoming 1.4 release. The version is already bumped on master, but it hasn't been tagged yet

@dlfivefifty dlfivefifty merged commit 37dac4a into JuliaArrays:master Jul 10, 2023
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.

2 participants