I would like to have the norm of one NumPy array. More specifically, I am looking for an equivalent version of this function
norm = np.linalg.norm(v)
if norm == 0:
return v / norm
Is there something like that in sklearn or numpy?
This function works in a situation where v is the 0 vector.
If you want to unleash your potential in this competitive field, please visit the Machine Learning course page for more information, where you can find the Machine Learning tutorials and Machine Learning frequently asked interview questions and answers as well.
This topic has been locked/unapproved. No replies allowed