7 Feb
2018
7 Feb
'18
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>