# [Matrix-SIG] Reading and handling matrices

**Konrad Hinsen
**
hinsen@cnrs-orleans.fr

*Fri, 23 Apr 1999 17:28:57 +0200*

>* 1. I was looking for some sparse matrix functions that would let me
*>* compute the eigen vectors of a rather large matrix in a
*>* reasonable amount of time. I have found the eigen value functions
*>* in the numeric library and I have found some linear algebra
*>* routines that allow sparse matrices, but I do not see a way to
*>* combine these. I ended up saving the matrix as ascii, editing it
*
Does that mean that your matrices are sparse? In that case, you should
use appropriate techniques, but... the problem with sparse matrices is
that there are so many different kinds of them, each requiring special
handling. Sparse matrix libraries usually require the user to provide
a matrix-vector multiplication routine. This routine has to use the
calling conventions of the library and is thus very likely impossible
to write in Python, even if performance were not a problem.
What this means is that I don't expect to find general sparse matrix
support in a Python package any time soon. Important special cases
could of course be handled.
If by any chance your matrices have the structure of second-derivative
matrices of finite-range potentials, I could provide a corresponding
sparse-matrix implementation with interfaces to ARPACK for finding
eigenvalues. In fact, it's in my Molecular Modelling Toolkit
(http://starship.python.net/crew/hinsen/mmtk.html)
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron | Fax: +33-2.38.63.15.17
45071 Orleans Cedex 2 | Deutsch/Esperanto/English/
France | Nederlands/Francais
-------------------------------------------------------------------------------