10 May
2014
10 May
'14
11:56 a.m.
On 05/08/2014 06:15 PM, marklasta wrote:
Hi there !
I'm wondering if possible to build a graph starting from the adjacency matrix.
Having such a matrix
matrix = [[1.0, 0.0], [1.0, 1.0]]
I'd like to build its graph
(0) --- (0)
(1) --- (0)
(1) --- (1)
Yes, you should do: adj = numpy.array(matrix) g = Graph() g.add_edge_list(transpose(adj.nonzero())) Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>