Euclidean norm of a vector

In the example below, we define a vector, calculate its Euclidean norm (length), and use the norm to renormalize the vector so it has norm 1.

>>> b = np.array([-1, -1,  4])
>>> bnorm = LA.norm(b)
>>> print(bnorm)
4.24264068712
>>> # Renormalize the vector
>>> bnew = b/bnorm
>>> print(bnew)
[-0.23570226 -0.23570226  0.94280904]
>>> print(LA.norm(bnew))
1.0