Skip to content

Commit 9361915

Browse files
authored
Merge pull request #11 from mhaeussermann/master
Changed .selfloop_edges to align with networkx 2.4
2 parents d8e0bdc + 1c2fabd commit 9361915

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

metaknowledge/graphHelpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,11 +803,11 @@ def graphStats(G, stats = ('nodes', 'edges', 'isolates', 'loops', 'density', 'tr
803803
if 'loops' in stats:
804804
if makeString:
805805
if sentenceString:
806-
stsData.append("{:G} self loops".format(len(list(G.selfloop_edges()))))
806+
stsData.append("{:G} self loops".format(len(list(nx.selfloop_edges(G)))))
807807
else:
808-
stsData.append("Self loops: {:G}".format(len(list(G.selfloop_edges()))))
808+
stsData.append("Self loops: {:G}".format(len(list(nx.selfloop_edges(G)))))
809809
else:
810-
stsData['loops'] = len(list(G.selfloop_edges()))
810+
stsData['loops'] = len(list(nx.selfloop_edges(G)))
811811
if 'density' in stats:
812812
if makeString:
813813
if sentenceString:

0 commit comments

Comments
 (0)