[SciPy-User] Gmres preconditionner
Puiseux Pierre
pierre.puiseux at univ-pau.fr
Fri Nov 20 03:37:44 EST 2015
Hello,
i try to solve a linear sparse system using scipy.sparse.linalg.gmres.
>>> w, v = gmres(A, b)
It works fine.
Now i’m trying to improve the iterations, using scipy.sparse.linalg.spilu preconditionner :
>>> invA = spilu(A)
>>> w,v = gmres(A, b, M=invA)
File "<string>", line 2, in gmres
File "/usr/local/lib/python2.7/site-packages/scipy/sparse/linalg/isolve/iterative.py", line 85, in non_reentrant
return func(*a, **kw)
File "/usr/local/lib/python2.7/site-packages/scipy/sparse/linalg/isolve/iterative.py", line 422, in gmres
A,M,x,b,postprocess = make_system(A,M,x0,b,xtype)
File "/usr/local/lib/python2.7/site-packages/scipy/sparse/linalg/isolve/utils.py", line 131, in make_system
M = aslinearoperator(M)
File "/usr/local/lib/python2.7/site-packages/scipy/sparse/linalg/interface.py", line 682, in aslinearoperator
raise TypeError('type not understood')
TypeError: type not understood
Do i mistake somewhere ?
Thanks for your answer.
Pierre Puiseux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20151120/e9b00472/attachment.html>
More information about the SciPy-User
mailing list