News

New paper! in the American Naturalist

Friday, November 15, 2019

Convert networkx graph to adjacency matrix

>> import networkx as nx
>> g # networkx graph
>> A = nx.adjacency_matrix(g)
>> A.todense() # to show details in the matrix