NumSharp
NumSharp copied to clipboard
np.linalg.norm
I am going to port np.linalg.norm(...)
It's not same as ?
ok, you are right. that implements the L2 norm I need. I'll add the shortcut np.linalg.norm(...) just for Python compatibility
no, after checking the code against the numpy docs, actually, the 2-norm is not the same what has been implemented in normalize(). There is no squaring of coefficients. Is that a bug?
https://het.as.utexas.edu/HET/Software/Numpy/reference/generated/numpy.linalg.norm.html
Yes, they're different.
Hi,
I also noticed that the function is missing in 0.20.5
.
I think one could add a shortcut from np.linalg.norm(a)
=> np.sqrt(a.dot(a))
instead, which should be equivalent.
Not sure about the overloads though.
Does this make sense to you?
Take care, Martin