python get vector norm code example
Example 1: norm complex numpy
#c is a complex number
np.linalg.norm(c)
#or
np.absolute(c)
Example 2: p-norm of a vector python
np.linalg.norm(x, 2)
#c is a complex number
np.linalg.norm(c)
#or
np.absolute(c)
np.linalg.norm(x, 2)