[Numpy-discussion] Re: Some missing linalg things (wanted: LU decomposition)
by Bill Baxter other posts by this author
Feb 19 2006 10:49PM messages near this date
Re: [Numpy-discussion] Re: Some missing linalg things (wanted: LU decomposition)
|
[Numpy-discussion] What is the status of the multidimensional arrays PEP?
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)
lu(A)
Traceback (most recent call last):
File "<input> ", line 1, in ?
File "C:\Python24\Lib\site-packages\scipy\linalg\decomp.py", line 249, in
lu
flu, = get_flinalg_funcs(('lu',),(a1,))
File "C:\Python24\Lib\site-packages\scipy\linalg\flinalg.py", line 30, in
get_flinalg_funcs
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.
--bb
On 2/20/06, Bill Baxter <wbaxter@[...].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.
>
> --bb
>
> On 2/20/06, Bill Baxter <wbaxter@[...].com> wrote:
> >
> > This url http://www.rexx.com/~dkuhlman/scipy_course_01.html<http://www.rexx.com/%7Edkuhl
man/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
> >
>
Attachments:
unknown1
unknown2
Thread:
Bill Baxter
Bill Baxter
Bill Baxter
Bill Baxter
Bill Baxter
|