[SciPy-user] Sparse identity matrix speye()

Travis Oliphant oliphant at ee.byu.edu
Thu Nov 11 15:42:21 EST 2004


Nils Wagner wrote:

> Hi all,
>
> Is there a better way to generate a sparse identity matrix
>
> I have used
>
> A=sparse.csc_matrix(identity(3))
>
Use coordinate format matrices:

A = sparse.coo_matrix( <lookup the input arguments> )

-Travis




More information about the SciPy-User mailing list