# [Numpy-tickets] [NumPy] #933: Where is LU decomposition?

NumPy numpy-tickets@scipy....
Tue Oct 14 22:27:19 CDT 2008

```#933: Where is LU decomposition?
--------------------------+-------------------------------------------------
Reporter:  moo           |        Owner:  somebody
Type:  defect        |       Status:  closed
Priority:  high          |    Milestone:
Component:  numpy.linalg  |      Version:  none
Severity:  normal        |   Resolution:  invalid
Keywords:                |
--------------------------+-------------------------------------------------
Changes (by charris):

* status:  new => closed
* resolution:  => invalid

Comment:

It isn't in numpy, it is in scipy.linalg.

{{{
In [1]: import scipy.linalg as la

In [2]: help(la.lu_factor)

In [3]: print la.lu_factor.__doc__
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 : array, shape (M, M)
Matrix to decompose
overwrite_a : boolean
Whether to overwrite data in A (may increase performance)

Returns
-------
lu : array, shape (N, N)
Matrix containing U in its upper triangle, and L in its lower
triangle.
The unit diagonal elements of L are not stored.
piv : array, shape (N,)
Pivot indices representing the permutation matrix P:
row i of matrix was interchanged with row piv[i].

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

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

}}}

Please don't use the tickets to ask questions, post to the numpy/scipy
mailing lists.

--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/933#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
```