[SciPy-dev] Comments on API for Matlab's eigs equivalent (computing a few eigenvalues only)

David Cournapeau cournape@gmail....
Sun Feb 7 06:05:31 CST 2010

On Sun, Feb 7, 2010 at 5:14 PM, Tiziano Zito <opossumnano@gmail.com> wrote:
>> > How does the new implementation relate to the existing implementation
>> > of selecting just a few eigenvalues in a range that is possible with
>> > the current scipy.linalg.eigh ?
>> Mostly a different interface (the underlying lapack function is the
>> same). What bothers me with the current API for eigen/svd
>> decompositions is the lack of consistency. The current eigh also does
>> not enable to look for eigenvalues in a value range (e.g. all eigen
>> values between 2 and 3), and I intend to add support for non-symmetric
>> eigenvalues as well.
> Is the new eigs function going to supersede eigh? I did not know
> that LAPACK allowed selecting a range of eigenvalues by value. Which
> are the LAPACK routines you are referring to?

The ones used in eigh, e.g. dsyevr. The range mode may be an addition
in lapack 3.0, I am not sure:

*  DSYEVR computes selected eigenvalues and, optionally, eigenvectors
*  of a real symmetric matrix A.  Eigenvalues and eigenvectors can be
*  selected by specifying either a range of values or a range of
*  indices for the desired eigenvalues.

> I agree that a consistent interface for eigen/svd decomposition is
> good, I am on the other hand a little unsure that linalg needs an
> eigs function together with an eigh function. Why not simply change the
> eigh interface in a backward compatible way?

Because I intend to support non-symmetric matrices (using arpack for
the unsymmetric case).


More information about the SciPy-Dev mailing list