Reshape a matrix to the target dimensions given by n_rows
and n_cols
.
np.reshape(mat, n_rows, n_cols)
Returns the dot product of two matrices.
Dot product is also known as matrix multiplication.
np.dot(mat_1, mat_2) # vector
Returns the cross product of two matrices.
np.cross(mat_1, mat_2) # This is what we multiply 2 matrix like (m x n) (n x m)
Computes the inverse of a matrix.
np.linalg.inv(mat)