Matrices
Matrices in NumPy are subclasses of ndarray
. Matrices can be created using a special string format. They are, just like in mathematics, two-dimensional. Matrix multiplication is, as you would expect, different from the normal NumPy multiplication. The same is true for the power operator. We can create matrices with the mat
, matrix
, and bmat
functions.