27 Dec
2017
27 Dec
'17
1:12 p.m.
hi, I have a scipy sparse matrix and I want to make a graph from this matrix in graphtool. In Netwrokx this is simplly done by from_scipy_sparse_matrix method(). is there any method like this in graph tool package? tnx. -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
7 Feb
7 Feb
1:22 p.m.
On 27.12.2017 13:12, hoptical wrote:
hi, I have a scipy sparse matrix and I want to make a graph from this matrix in graphtool. In Netwrokx this is simplly done by from_scipy_sparse_matrix method(). is there any method like this in graph tool package?
If 'a' is your sparse matrix, you can do: g = Graph() g.add_edge_list(array(a.nonzero()).T) Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
2870
Age (days ago)
2912
Last active (days ago)
1 comments
2 participants
participants (2)
-
hoptical -
Tiago de Paula Peixoto