Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 23202

Ben Cook: Calculating the norm of an array in NumPy: all about np.linalg.norm()

$
0
0
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...

Viewing all articles
Browse latest Browse all 23202

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>