ulab.linalg

Linear algebra functions

ulab.linalg.cholesky(A)
Parameters:A (array) – a positive definite, symmetric square matrix
Return ~ulab.array L:
 a square root matrix in the lower triangular form
Raises:ValueError – If the input does not fulfill the necessary conditions

The returned matrix satisfies the equation m=LL*

ulab.linalg.det()
Param:m, a square matrix
Return float:The determinant of the matrix

Computes the eigenvalues and eigenvectors of a square matrix

ulab.linalg.dot(m1, m2)
Parameters:

Computes the matrix product of two matrices

WARNING: Unlike numpy, this function cannot be used to compute the dot product of two vectors

ulab.linalg.eig(m)
Parameters:m – a square matrix
Return tuple (eigenvectors, eigenvalues):
 

Computes the eigenvalues and eigenvectors of a square matrix

ulab.linalg.inv(m)
Parameters:m (array) – a square matrix
Returns:The inverse of the matrix, if it exists
Raises:ValueError – if the matrix is not invertible

Computes the inverse of a square matrix

ulab.linalg.size(array)

Return the total number of elements in the array, as an integer.

ulab.linalg.trace(m)
Parameters:m – a square matrix

Compute the trace of the matrix, the sum of its diagonal elements.