ulab.linalg¶
Linear algebra functions
-
ulab.linalg.size(array)¶ Return the total number of elements in the array, as an integer.
-
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.dot(m1, m2)¶ -
Computes the product of two matrices, or two vectors. In the letter case, the inner product is returned.
-
ulab.linalg.det()¶ - Param
m, a square matrix
- Return float
The determinant of the matrix
-
ulab.linalg.eig(m)¶ - Parameters
m – a square matrix
- Return tuple (eigenvectors, eigenvalues)
Computes the eigenvalues and eigenvectors of a square matrix
-
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.trace(m)¶ - Parameters
m – a square matrix
Compute the trace of the matrix, the sum of its diagonal elements.