[SciPy-user] Sparse identity matrix speye()

Travis Oliphant oliphant at ee.byu.edu
Thu Nov 11 14:42:21 CST 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