[Numpy-discussion] Re: Some missing linalg things (wanted: LU decomposition)
wbaxter at gmail.com
Sun Feb 19 22:49:05 EST 2006
Ack. I may be able to get references to lu, lu_factor, et al, but they
don't actually work with numpy arrays:
from scipy.linalg import lu,lu_factor,lu_solve
import scipy as S
A = S.rand(2,2)
Traceback (most recent call last):
File "<input>", line 1, in ?
File "C:\Python24\Lib\site-packages\scipy\linalg\decomp.py", line 249, in
flu, = get_flinalg_funcs(('lu',),(a1,))
File "C:\Python24\Lib\site-packages\scipy\linalg\flinalg.py", line 30, in
t = arrays[i].dtypechar
AttributeError: 'numpy.ndarray' object has no attribute 'dtypechar'
Ok, so, once again, does anyone have an lu_factor / lu_solve implementation
in python that I could borrow?
Apologies for the monologue.
On 2/20/06, Bill Baxter <wbaxter at gmail.com> wrote:
> Upon further inspection I find that if I call 'from scipy import *' then
> linalg.lu etc are defined.
> But if I do anything else to import scipy like 'import scipy' or 'import
> scipy as S' or 'from scipy import linalg', then lu, cg etc are not defined.
> Why is that?
> I can get at them without importing * by doing 'from scipy.linalg import
> lu', but that's kind of odd to have to do that.
> On 2/20/06, Bill Baxter <wbaxter at gmail.com> wrote:
> > This url http://www.rexx.com/~dkuhlman/scipy_course_01.html<http://www.rexx.com/%7Edkuhlman/scipy_course_01.html>seems to keep turning up in my searches for numpy and scipy things,
> > but many of the linalg operations it lists don't seem to exist in recent
> > versions of numpy (or scipy).
> > Some of them are:
> > * norm
> > * factorizations: lu, lu_factor, lu_solve, qr
> > * iterative solvers: cg, cgs, gmres etc.
> > Did these things used to exist in Numeric but they haven't been ported
> > over? Will they be re-introduced sometime?
> > In the short term, the one I'm after right now is LU decompose and solve
> > functionality. Anyone have a numpy implementation?
> > --Bill Baxter
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion