networkx.to_scipy_sparse_matrix
Reading and writing graphs
Enter search terms or a module, class or function name.
Return a graph from scipy sparse matrix adjacency list.
A : scipy sparse matrix
An adjacency matrix representation of a graph
create_using : NetworkX graph
Use specified graph for result. The default is Graph()
Examples
>>> import scipy.sparse >>> A=scipy.sparse.eye(2,2,1) >>> G=nx.from_scipy_sparse_matrix(A)