linalg ¶
the linear algebra submodule for numluau.
methods¶
matmul -> () ¶
returns the result of a matrix multiplication between A and B if A is ndim = 2 and B is ndim = 1 then a matrix-vector multiplication is done instead.
lu -> () ¶
preforms a LU decomposition on the matrix, producing values: - lower triangular ndArray (L). - upper triangular ndArray (U). - permutation table. - swap count. given matrix = LU
det -> () ¶
returns the determinant of the matrix.
dot -> () ¶
returns the dot product between A and B.
cross -> () ¶
returns the cross product between A and B
qr -> () ¶
Performs a QR decomposition on the matrix, returning a orthogonal matrix Q and a upper triangular matrix R.
eigenval -> () ¶
Returns the eigen values of the matrix.
eig -> () ¶
returns the eigen values and eigen vectors of the matrix the eigen vectors being given as a single 2d ndArray in column major order.
solve -> () ¶
returns the solution to the equation \(Ax = B\)
norm -> () ¶
Normalises a matrix across a axis order = 1 does a manhattan normalisation order = 2 does a euclidean normalisation order defaults to 2 axis defaults to 0
svd -> () ¶
Performs a SVD decomposition, returning U, Vt and the matrix's singular values.
lstsq -> () ¶
Preforms a least squares fit on x and y, producing the coefficents of degree degree in descending order
degree defaults to 0.