-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
LinearAlgebra.normalize(x) should work for scalars #920
Comments
Is this the same as |
it's very similar, but has different behavior for zero. |
Does that matter for this case? If I'm reading the paper right, |
Yes, in this particular case, you're right that I could have used However, it still doesn't make sense to me that the Indeed, we could just define the fallback: normalize(x) = x / norm(x)
normalize(x, p) = x / norm(x, p) (where |
I've been meaning to get more involved and this looks like a good first issue. I should have a PR ready later today. |
Co-authored-by: Steven G. Johnson <[email protected]>
Currently, this is defined only for arrays, but it seems like we should have
(I just came across this when trying to implement this algorithm for random unitary matrices, which is basically
Q * Diagonal(normalize.(diag(R))
, but I discovered thatnormalize
didn't work.)The text was updated successfully, but these errors were encountered: