O'Reilly logo

Hands-On Data Analysis with NumPy and pandas by Curtis Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linear algebra

Be aware that NumPy is built to support linear algebra. A 1D NumPy array may correspond to a linear algebra vector; a 2D array to a matrix; and 3D, 4D, or all ndarray to tensors. So, when appropriate, NumPy supports linear algebra operations, such as matrix products, transposition, matrix inversion, and so on, for arrays. Most NumPy linear algebra functionality is supported in the linalg module. The following is a list of commonly used NumPy linear algebra functions:

Some of these are ndarray methods, others are in the linalg module you need to import. So we've actually been demonstrating transpose up to this point in earlier ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required