This can be used to calculate the euclidean norm of vector or a list of vectors, provided they are given as numpy arrays.
Parameters : | vectors : numpy.ndarray \((N,3)\)
|
---|---|
Returns : | norms : numpy.ndarray \((N)\)
|
Examples
>>> inp = norm(np.array([1,1,0]))
>>> out = np.sqrt(2)
>>> assert(aeq(inp, out))
And for multiple vectors:
>>> inp = norm(np.array([[1,1,0],
... [1,1,1]]))
>>> out = np.array([np.sqrt(2),
... np.sqrt(3)])
>>> assert(aeq(inp, out))