### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Linear algebra (`scipy.linalg`) »

# scipy.linalg.lu_factor

`scipy.linalg.``lu_factor`(a, overwrite_a=False, check_finite=True)

  Compute pivoted LU decomposition 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 : (M, M) array_like Matrix to decompose overwrite_a : boolean Whether to overwrite data in A (may increase performance) check_finite : boolean, optional Whether to check the input matrixes contain only finite numbers. Disabling may give a performance gain, but may result to problems (crashes, non-termination) if the inputs do contain infinities or NaNs.
  Returns : | lu : (N, N) ndarray Matrix containing U in its upper triangle, and L in its lower triangle. The unit diagonal elements of L are not stored. piv : (N,) ndarray Pivot indices representing the permutation matrix P: row i of matrix was interchanged with row piv[i].

  See also

  `lu_solve`
    solve an equation system using the LU factorization of a matrix

  Notes

  This is a wrapper to the `*GETRF` routines from LAPACK.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Linear algebra (`scipy.linalg`) »