Return adjacency matrix of G.
Parameters : | G : graph
nodelist : list, optional
|
---|---|
Returns : | A : numpy matrix
|
See also
to_numpy_matrix, to_dict_of_dicts
Notes
If you want a pure Python adjacency matrix representation try networkx.convert.to_dict_of_dicts which will return a dictionary-of-dictionaries format that can be addressed as a sparse matrix.