[SciPy-dev] Comments on API for Matlab's eigs equivalent (computing a few eigenvalues only)
David Cournapeau
cournape@gmail....
Thu Feb 4 19:27:07 CST 2010
On Fri, Feb 5, 2010 at 9:43 AM, Warren Weckesser
<warren.weckesser@enthought.com> wrote:
> David C,
>
> You said this was for symmetric matrices, but do you envision later
> allowing nonsymmetric matrices?
Yes. I have only implemented symmetric/Hermitian because that's the
only solver that handles getting only a few eigenvalues in LAPACK.
Matlab own eigs function uses ARPACK for both symmetric/unsymmetric
cases, which is not good according to one of the Lapack developer
(http://mail.scipy.org/pipermail/scipy-dev/2007-March/006778.html).
But we could use ARPACK for the general case in eigs.
>
> If not, then perhaps the name of the function should be 'eigsh',
> following the precedent set by numpy.linalg and scipy.linalg.
I wonder whether those eigh functions are a good idea: I fear that
most people will always use eig - maybe one could use the underlying
eig*h solver in eig* if the matrix is detected as being symmetric ? I
am not really knowledgeable about those issues, though. For example, I
don't know whether the symmetric aspect should be checked exactly, or
if it is better to use a symmetric solver even if there are very
small errors in say A'-A.
>
> In particular, the choice of ordering by magnitude or by real part is
> convenient.
It seems that one would need to implement the non-symmetric
capabilities to sort this out. I fear that those options are solver
specific, though - maybe the solution is to have two levels of API,
one low-level and one high level.
cheers,
David
More information about the SciPy-Dev
mailing list