Sparse identity matrix speye()
![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
11 Nov
2004
11 Nov
'04
12:10 p.m.
Hi all, Is there a better way to generate a sparse identity matrix I have used A=sparse.csc_matrix(identity(3)) Nils
![](https://secure.gravatar.com/avatar/4d021a1d1319f36ad861ebef0eb5ba44.jpg?s=120&d=mm&r=g)
11 Nov
11 Nov
8:42 p.m.
New subject: [SciPy-user] Sparse identity matrix speye()
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
7174
Age (days ago)
7174
Last active (days ago)
1 comments
2 participants
participants (2)
-
Nils Wagner
-
Travis Oliphant