Closed lesterlitch closed 6 years ago
it depends on your networkx
version. if you use networkx
>=2.0 then you should be fine. check out my readme file: https://github.com/zhiyzuo/python-modularity-maximization/blob/master/README.rst
thanks for pointing this out though!
In community_newman.py:
nx.set_edge_attributes(G=network, name='weight', values={edge:1 for edge in network.edges})
should be: nx.set_edge_attributes(G=network, name='weight', values={edge:1 for edge in network.edges()})
Should it not? Otherwise I get "TypeError: 'instancemethod' object is not iterable"