Open micahstubbs opened 9 years ago
What version of networkx
do you have? You can check by
import networkx as nx
nx.__version__
With v1.9.1, the example runs fine, and the output of nx.adjacency_matrix(G)
appears to be a sparse matrix, whereas the error you see implies it is a normal numpy
matrix
. A tricky thing with notebooks is that you can't force required versions of libraries used, but we could specify a version requirement for this notebook for networkx
if that's indeed the issue.
'1.7'
I ran
$ pip install networkx --upgrade
after that I show version
'1.9.1'
after upgrading networkx from version '1.7'
that came with my Anaconda distribution to '1.9.1'
it works!
// could specify a version requirement for this notebook for networkx
this looks like a good idea.