[SciPy-dev] ARPACK wrapper first cut
hagberg at lanl.gov
Wed Oct 11 22:19:45 CDT 2006
I have uploaded another version of the wrappers that
I think clears up the errors I was seeing with the original.
The package includes wrappers to the symmetric, nonsymmetric,
real and complex eigensolvers (which have just a different enough
interface to make life interesting). I generated the wrappers with
f2py but I'm a novice there - they could benefit from some expert
The sometimes incorrect answers in the nonsymmetric solver routines
were apparently coming from a mis-compiled <s,d>lahqr.f in my system
lapack3 libraries. I included these files in the package - the rest
of the lapack library seems OK for use with ARPACk. That kind of
annoying thing turns out to take a while to find.
Also I have included Python code in a similar style to
linalg.iterative to call the wrapped functions. That code only
implements the simple eigenvalue problem (A x = lambda x) but it
should be possible to add code to solve the generalized problem (A x =
lambda M x) with various inverse and shifted modes. Neilen has
reported doing this already using linsolve.splu as the sparse
linear system solver but I don't have code for that yet.
Finally there are some tests and other scipyish bits.
You should be able to unpack the code into Lib/sandbox and
give it a try.
This is a missing piece of the chart (eigs) at
I don't know Matlab and I didn't try to make the Python interface
match eigs. But I'm pretty sure the one I designed isn't much
better or different.
More information about the Scipy-dev