-
Notifications
You must be signed in to change notification settings - Fork 152
Fixes to norm
and friends (closes #915)
#929
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
Conversation
Regarding test failures:
I tested that the remaining tests pass locally (on Julia v1.6.0). |
59619ca
to
736df94
Compare
CI is green on this - anyone up for reviewing this? (could I bother you perhaps @mateuszbaran?) (I know caring about |
I'll take a look at this soon. There has recently been some trouble with |
Thanks! |
Thanks for review and comments @mateuszbaran. There's one issue remaining (in |
Having |
Hmm, having norm(SA[[0,0],[1,1]], 0) since we need to infer the element type in To fix that, we can just use It seems cleaner to me just to let the signature of |
Well, I think |
@matbesancon gentle bump: would be good to wrap this one up while we both remember it :) |
I've looked at it again, would you be OK with |
Thanks! One last thing, could you bump the patch version? |
…ctArray` - also fix copying errors from last commit
Sure: rebased and bumped patch version in latest commit 👍 |
This closes the issue noted in #915, i.e. the following now works:
which threw before. It also fixes a similar issue for the "p"-
norm
.This also fixes a few other issues with
norm
and friends:norm
and "p"-norm
were susceptible to integer overflow because they didn't convert to float early. They do now. This reduces performance a slight bit for::SVector{Int}
but that seems preferable to quietly overflowing.norm
implementation was type-unstable forSVector{Int}
inputs (sometimes returningFloat64
sometimesInt
, depending onp
). It now always returns a floating point value, consistently with Base.