Skip to content

Commit 77bf5c2

Browse files
John McLeveyJohn McLevey
authored andcommitted
updated .node to .nodes to align with networkx upgrade
1 parent 8162bf9 commit 77bf5c2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

metaknowledge/recordCollection.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,24 +1030,24 @@ def attributeMaker(Rec):
10301030
if auth1 not in grph:
10311031
grph.add_node(auth1, **detailedInfo.copy())
10321032
elif count:
1033-
grph.node[auth1]['count'] += 1
1033+
grph.nodes[auth1]['count'] += 1
10341034
if citeProfile:
10351035
for c in citesLst:
10361036
try:
1037-
grph.node[auth1]['citeProfile'][c] += 1
1037+
grph.nodes[auth1]['citeProfile'][c] += 1
10381038
except KeyError:
1039-
grph.node[auth1]['citeProfile'][c] = 1
1039+
grph.nodes[auth1]['citeProfile'][c] = 1
10401040
for auth2 in authsList[i + 1:]:
10411041
if auth2 not in grph:
10421042
grph.add_node(auth2, **detailedInfo.copy())
10431043
elif count:
1044-
grph.node[auth2]['count'] += 1
1044+
grph.nodes[auth2]['count'] += 1
10451045
if citeProfile:
10461046
for c in citesLst:
10471047
try:
1048-
grph.node[auth2]['citeProfile'][c] += 1
1048+
grph.nodes[auth2]['citeProfile'][c] += 1
10491049
except KeyError:
1050-
grph.node[auth2]['citeProfile'][c] = 1
1050+
grph.nodes[auth2]['citeProfile'][c] = 1
10511051
if grph.has_edge(auth1, auth2) and weighted:
10521052
grph.edges[auth1, auth2]['weight'] += 1
10531053
elif weighted:
@@ -1644,7 +1644,7 @@ def addToNetwork(grph, nds, count, weighted, nodeType, nodeInfo, fullInfo, coreC
16441644
nodeName, nodeDat = makeNodeTuple(n, nID, nodeInfo, fullInfo, nodeType, count, coreCitesDict, coreValues, detailedValues, addCR)
16451645
grph.add_node(nodeName, **nodeDat)
16461646
elif count:
1647-
grph.node[nID]['count'] += 1
1647+
grph.nodes[nID]['count'] += 1
16481648
idList.append(nID)
16491649

16501650
addedEdges = []
@@ -1798,7 +1798,7 @@ def expandRecs(G, RecCollect, nodeType, weighted):
17981798
if citeID1 in G:
17991799
for citeID2 in fullCiteList[i + 1:]:
18001800
if citeID2 not in G:
1801-
G.add_node(citeID2, **G.node[citeID1])
1801+
G.add_node(citeID2, **G.nodes[citeID1])
18021802
if weighted:
18031803
G.add_edge(citeID1, citeID2, weight = 1)
18041804
else:

0 commit comments

Comments
 (0)