[SciPy-Dev] bicgstab

Dieter Werthmüller dieter at werthmuller.org
Thu Nov 1 08:21:05 EDT 2018


Hi everyone,

I've got some questions related to scipy.sparse.linalg.bicgstab.

I try to move some code from Matlab to Python. Now, in the 
Matlab-bicgstab the matrix A and the preconditioner M can be function 
handles; from the docs:

   "A can be a function handle, afun, such that afun(x) returns A*x."

and similar

   "M can be a function handle mfun, such that mfun(x) returns M\x."

This can be very useful, because you can avoid creating the matrices A 
and M explicitly.

As far as I can see, this is not possible in scipy.sparse.linalg.bicgstab.

Therefore my questions:

- Is that correct, it is not possible with scipy.sparse.linalg.bicgstab, 
or do I miss something? (Are there any examples online? I couldn't find 
much in the docs.)

- Is there a trick to achieve the same behaviour in 
scipy.sparse.linalg.bicgstab?

- If not, do you know of other packages in Python that provide that feature?

Thanks a lot,
Dieter


More information about the SciPy-Dev mailing list