diff --git a/requirements.txt b/requirements.txt index 791f46a..d4b52ee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ matplotlib -networkx==1.11 +networkx==2.2 gnureadline diff --git a/utils.py b/utils.py index ce03912..fdc93e4 100644 --- a/utils.py +++ b/utils.py @@ -5,7 +5,7 @@ def reciprocity(G): """Calculate reciprocity of graph, i.e. the ratio of the edges in one direction that have and edge going in the other direction.""" return sum([G.has_edge(e[1], e[0]) - for e in G.edges_iter()]) / float(G.number_of_edges()) + for e in G.edges]) / float(G.number_of_edges()) def short_names(names): labels = {}