Then you have to dig in deeper:
import numarray import numarray.linear_algebra import numarray.linear_algebra.lapack_lite2 as lapack_lite
piv = numarray.zeros((n,), "l") outcome = lapack_lite.dgesv(n, nrhs, a, lda, piv, b, ldb, 0)
outcome['info'] is the 'info' parameter set by LAPACK.
You have to make sure that 'a' and 'b' are in Fortran order because you're calling Fortran code. Here is a sample code:
a=numarray.array([[1,2,3],[4,5,6]], 'd') a.is_fortran_contiguous()
Call to 'transpose()' made it a Fortran array but it transposed the array too.
What I actually want is the lower (L) and upper triangular matrix (U) from matrix 'a'. How to get it?
At 15:14 2005-10-4 -0400, you wrote:
You would have to be more specific. If you just want to solve a system of linear equations with matrix 'a' and right-hand-side 'b':
import numarray.linear_algebra as LA
x = LA.solve_linear_equations(a, b)
Unlike LAPACK, the above will leave your 'a' untouched. So, if you have another right hand side 'b1' and the same matrix 'a' you'll have to pay the cost of factorization all over again.
There is a way around it but I don't know what you really need.
Hi there- Can someone help me on this? Thanks! Best, Xiangyi Xiangyi Meng Department of Agricultural and Resource Economics Room 303, Giannini Hall #3310 University of California, Berkeley Berkeley, CA 94720-3310 Tel: (510) 643-4124 Fax: (510) 643-8911 Email: email@example.com
This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Numpy-discussion mailing list Numpyfirstname.lastname@example.org https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Xiangyi Meng Department of Agricultural and Resource Economics Room 303, Giannini Hall #3310 University of California, Berkeley Berkeley, CA 94720-3310 Tel: (510) 643-4124 Fax: (510) 643-8911 Email: email@example.com