infomap-notebooks
infomap-notebooks copied to clipboard
some errors in 1_1_infomap_intro.ipynb
when i run the code in "1_1_infomap_intro.ipynb", some errors show,and i can't fix it,like: `infomap1 = infomap.Infomap("--directed")
network = infomap1.network()
network.addLink(0, 1) network.addLink(0, 2) network.addLink(0, 3) network.addLink(1, 0) network.addLink(1, 2) network.addLink(2, 1) network.addLink(2, 0) network.addLink(3, 0) network.addLink(3, 4) network.addLink(3, 5) network.addLink(4, 3) network.addLink(4, 5) network.addLink(5, 4) network.addLink(5, 3)`
then, error is:
TypeError: 'Network' object is not callable
Is it caused by the different versions of Infomap?Please,help me,thank you.
Hi, thanks for your feedback! Yes you are right, this code was based on the beta API which was updated for 1.0. We will update these notebooks accordingly, but in the meantime you can check here for the up-to-date api.
For this error, the network is now a property so () should be removed, but the preferred way is to use add_link(...) directly on the infomap object.