Obtenez un scalaire de tableau numpy vectoriel
mag = np.sqrt(x.dot(x))
Annoying Armadillo
mag = np.sqrt(x.dot(x))
import numpy as np
x = np.array([1,2,3,4,5])
np.linalg.norm(x)
#kinda weird for numpy to name it 'norm'