A norm is a measure of the size of a matrix or vector and you can compute it in NumPy with the np.linalg.norm() function[1]: import numpy as np x = np.eye(4) np.linalg.norm(x) # Expected result # 2.0 When np.linalg.norm() is called on an array-like input without any additional arguments, the...
↧