[SciPy-User] scipy.sparse.linalg.lobpcg broken?

Robert Cimrman cimrman3@ntc.zcu...
Thu Oct 14 01:53:02 CDT 2010


On Wed, 13 Oct 2010, Pauli Virtanen wrote:

> Wed, 13 Oct 2010 22:57:49 +0200, Nico Schlömer wrote:
>> Bisection action yields:
>> 
>> Line 131ff:
>>
>>     print 'gramVBV', gramVBV
>>     sla.inv( gramVBV, overwrite_a = True )
>>     print 'gramVBV', gramVBV
>
> Well spotted, that piece of code is wrong.
>
> overwrite_a=True in general does not guarantee that the output is 
> overwritten, it just gives the routine the possibility to do so if 
> possible.

Ah, ok, I was not aware of that. It is not mentioned in the docstring.

> For example, if the input matrix is in C-order but your system has only 
> Fortran-lapack available (or vice versa), a copy is made. I think this 
> may be the difference in your case between the different machines.

Yes, this makes sense. Anyway, a note in the inv() doc would be nice.

r.

> (Of course, for the inverse you could just invert the transpose, and 
> transpose after inverse, but the routine here is not smart enough to 
> check for that possibility.)


More information about the SciPy-User mailing list