[SciPy-user] io.mmread

Pearu Peterson pearu at scipy.org
Mon Oct 18 10:31:30 CDT 2004



On Mon, 18 Oct 2004, Nils Wagner wrote:

> Hi all,
>
> I am going to read matrices given in MatrixMarket format
>
>>>> io.mmread('bfw62a.mtx')
> <62x62 sparse matrix of type 'd' with 450 stored elements (space for 450) in
>       COOrdinate format>
>
>>>> print io.mmread('bfw62a.mtx')
>
> gives the entries, but how can I assign this matrix to an array to
> compute the eigenvalues of this matrix ?

>>> m=io.mmread('bfw62a')
>>> a=m.todense()
>>> linalg.eigvals(a)

Pearu



More information about the SciPy-user mailing list