[SciPy-user] Creating a sparse matrix

Nils Wagner nwagner@iam.uni-stuttgart...
Thu Dec 13 11:07:17 CST 2007


On Thu, 13 Dec 2007 16:45:43 +0100
  Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
> 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)) )
> 

Many thanks.
The file contains only the upper triangular part of the
symmetric matrix. How can I add the lower part to A ?

Nils

  


More information about the SciPy-user mailing list