-
-
Notifications
You must be signed in to change notification settings - Fork 33
Specialize norm-related functions for Diagonal #1457
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1457 +/- ##
==========================================
+ Coverage 93.89% 93.90% +0.01%
==========================================
Files 34 34
Lines 15926 15936 +10
==========================================
+ Hits 14953 14964 +11
+ Misses 973 972 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
end | ||
|
||
@testset "norm" begin | ||
D = Diagonal(float.(1:3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
for D in ( Diagonal(1:3), Diagonal(1:1), Diagonal(1:0) )
to test the 1x1 and 0x0 cases?
Also, skip the float
conversion to make sure the result is floating-point, maybe add a ::Float64
assert to the result
Co-authored-by: Steven G. Johnson <[email protected]>
44ebe95
to
e74bdb4
Compare
For banded matrices such as
Diagonal
, we may skip the non-stored elements in computing the norm, as the contribution of these would be zero.This improves performance.
On master
vs this PR