[Numpy-discussion] What approach is used in linalg.solve ?

Timothy Hochberg tim.hochberg at ieee.org
Fri Sep 21 10:37:42 EDT 2007


If you take a look at the source of numpy's linalg.py, you'll see that
solves uses dgesv /zgesv for real /complex solves. If you Google dgesv, you
get:

    DGESV computes the solution to a real system of linear equations
       A * X = B,
    where A is an N-by-N matrix and X and B are N-by-NRHS matrices.

    The LU decomposition with partial pivoting and row interchanges is
    used to factor A as
       A = P * L * U,
    where P is a permutation matrix, L is unit lower triangular, and U is
    upper triangular.  The factored form of A is then used to solve the
    system of equations A * X = B.

Don't take my word for it though; that was just the first google hit I
found. Also, I don't know if scipy solve differs from numpy.solve here, nor
which you are using, so I recommend that you repeat the exercise on your
own.

-tim


On 9/21/07, mark <markbak at gmail.com> wrote:
>
> Hello, anybody know what approach is used in linalg.solve?
>
> I used it in a paper and some reviewer wants to know.
>
> Some Gaussian elimination with pivoting or something more fancy?
>
> Thanks,
>
> Mark
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
.  __
.   |-\
.
.  tim.hochberg at ieee.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070921/7e2a92ac/attachment.html>


More information about the NumPy-Discussion mailing list