JuliaArrays / FillArrays.jl

Julia package for lazily representing matrices filled with a single entry
https://juliaarrays.github.io/FillArrays.jl/
MIT License
181 stars 38 forks source link

Specialize LinearAlgebra.symmetric for AbstractFill #372

Closed jishnub closed 2 months ago

jishnub commented 2 months ago

This is used in places in LinearAlgebra, and currently

julia> F = Fill(3, 4, 4)                                                          
4×4 Fill{Int64}, with entries equal to 3

julia> LinearAlgebra.symmetric(F)                                                 
4×4 Symmetric{Int64, Fill{Int64, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}:
 3  3  3  3
 3  3  3  3
 3  3  3  3
 3  3  3  3

However, since a Fill is symmetric, we may avoid the wrapper and obtain

julia> LinearAlgebra.symmetric(F)                                                 
4×4 Fill{Int64}, with entries equal to 3

This helps ensure type-stability.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.90%. Comparing base (f659d9f) to head (f66544b). Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #372 +/- ## ======================================= Coverage 99.90% 99.90% ======================================= Files 8 8 Lines 1106 1108 +2 ======================================= + Hits 1105 1107 +2 Misses 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.