import numpy as np
import numpy.linalg as alg
data=np.loadtxt("data",delimiter=",",dtype=float)
Matrix Operations | Explanation |
alg.det (data) | Calculate the determinant of a matrix |
alg.eig (data) | Calculate the eigenvalues and eigenvectors of the square matrix |
alg.inv(data) | Calculate the inverse of a square matrix |
alg.pinv(data) | Calculate the pseudo-inverse of a square matrix |
alg.qr(data) | Calculate qr decomposition |
alg.svd (data) | Calculate singular value decomposition svd |
alg.solve(data) | Solve the linear equations of the square matrix data |
alg.lstsq(data) | Calculate the least squares solution of the linear equations of the matrix data |