Saturday, January 9, 2021

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

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

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...