[SciPy-user] Creating a sparse matrix

Robert Cimrman cimrman3 at ntc.zcu.cz
Thu Dec 13 10:45:43 EST 2007


Nils Wagner wrote:
> Thank you very much for your code snippet !
> How do I use the COO constructor to build the
> matrix from rows, cols and vals ?

A = coo_matrix( (vals, (rows, cols)) )

r.



More information about the SciPy-User mailing list