[SciPy-user] Creating a sparse matrix
Nils Wagner
nwagner at iam.uni-stuttgart.de
Thu Dec 13 12:07:17 EST 2007
On Thu, 13 Dec 2007 16:45:43 +0100
Robert Cimrman <cimrman3 at 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