diff options
| author | Mridul Seth <seth.mridul@gmail.com> | 2015-12-29 00:36:03 +0530 |
|---|---|---|
| committer | Mridul Seth <seth.mridul@gmail.com> | 2015-12-29 00:36:03 +0530 |
| commit | f1940be12af0701664389428d72c5b73eeec2599 (patch) | |
| tree | b04c2ac2dc5313a28cba44d9b202d5e921cffe4e | |
| parent | 8d236501d66c4f52984399783ac38bd435f5555b (diff) | |
| download | networkx-f1940be12af0701664389428d72c5b73eeec2599.tar.gz | |
Update community/quality to use quotient_graph instead of blockmodel
| -rw-r--r-- | networkx/algorithms/community/quality.py | 2 | ||||
| -rw-r--r-- | networkx/algorithms/cuts.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/networkx/algorithms/community/quality.py b/networkx/algorithms/community/quality.py index faf6dc01..79c11629 100644 --- a/networkx/algorithms/community/quality.py +++ b/networkx/algorithms/community/quality.py @@ -121,7 +121,7 @@ def inter_community_edges(G, partition): # for block in partition)) # return sum(1 for u, v in G.edges() if aff[u] != aff[v]) # - return nx.blockmodel(G, partition, multigraph=True).size() + return nx.quotient_graph(G, partition, create_using=nx.MultiGraph()).size() def inter_community_non_edges(G, partition): diff --git a/networkx/algorithms/cuts.py b/networkx/algorithms/cuts.py index aff9c287..d5fb764b 100644 --- a/networkx/algorithms/cuts.py +++ b/networkx/algorithms/cuts.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # cuts.py - functions for computing and evaluating cuts # # Copyright 2011 Ben Edwards <bedwards@cs.unm.edu>. |
