From 2b84ef1d2186dc46340df9ed958d3ce92150db08 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Sat, 23 May 2015 16:56:04 +0530 Subject: Remove edges_iter, G.edges() now returns an iterator instead of list --- networkx/algorithms/cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networkx/algorithms/cluster.py') diff --git a/networkx/algorithms/cluster.py b/networkx/algorithms/cluster.py index 8947b3cd..29d96243 100644 --- a/networkx/algorithms/cluster.py +++ b/networkx/algorithms/cluster.py @@ -89,7 +89,7 @@ def _weighted_triangles_and_degree_iter(G, nodes=None, weight='weight'): if G.is_multigraph(): raise NetworkXError("Not defined for multigraphs.") - if weight is None or G.edges()==[]: + if weight is None or list(G.edges())==[]: max_weight=1.0 else: max_weight=float(max(d.get(weight,1.0) -- cgit v1.2.1