[SciPy-user] Possibly bug in iterative.py

Nils Wagner nwagner at mecha.uni-stuttgart.de
Thu Nov 11 03:47:07 CST 2004


Hi all,

I am going to solve large scale linear systems with linalg.gmres
This is the output of my test program...

Traceback (most recent call last):
  File "test1.py", line 12, in ?
    x1 = linalg.gmres(ma-s*mb,r)
  File "/usr/lib/python2.3/site-packages/scipy/linalg/iterative.py", 
line 472, in gmres
    work = sb.zeros((6+restrt)*n,typ)
ValueError: negative dimensions are not allowed
 >>> ma
<67986x67986 sparse matrix of type 'd' with 4222171 stored elements 
(space for 4222171) in
        COOrdinate format>
 >>> mb
<67986x67986 sparse matrix of type 'd' with 68150 stored elements (space 
for 68150) in
        COOrdinate format>
 >>> s
(3000000+1j)
 >>> type(r)
<type 'array'>
 >>> shape(r)
(67986,)

Any suggestion ?

Nils

 



More information about the SciPy-user mailing list