scipy.linalg.lu

scipy.linalg.lu(a, permute_l=False, overwrite_a=False)[source]

Compute pivoted LU decompostion of a matrix.

The decomposition is:

A = P L U

where P is a permutation matrix, L lower triangular with unit diagonal elements, and U upper triangular.

Parameters :

a : array, shape (M, N)

Array to decompose

permute_l : boolean

Perform the multiplication P*L (Default: do not permute)

overwrite_a : boolean

Whether to overwrite data in a (may improve performance)

Returns :

(If permute_l == False) :

p : array, shape (M, M)

Permutation matrix

l : array, shape (M, K)

Lower triangular or trapezoidal matrix with unit diagonal. K = min(M, N)

u : array, shape (K, N)

Upper triangular or trapezoidal matrix

(If permute_l == True) :

pl : array, shape (M, K)

Permuted L matrix. K = min(M, N)

u : array, shape (K, N)

Upper triangular or trapezoidal matrix

Notes

This is a LU factorization routine written for Scipy.

Previous topic

scipy.linalg.eigvals_banded

Next topic

scipy.linalg.lu_factor