Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/easy-graph/Easy-Graph
/ relabel_nodes
Function
relabel_nodes
easygraph/utils/relabel.py:7–12 ·
view source on GitHub ↗
(G, mapping)
Source
from the content-addressed store, hash-verified
5
6
7
def
relabel_nodes(G, mapping):
8
if
not hasattr(mapping,
"__getitem__"
):
9
m = {n: mapping(n)
for
n in G}
10
else
:
11
m = mapping
12
return
_relabel_copy(G, m)
13
14
15
def
_relabel_copy(G, mapping):
Callers
1
convert_node_labels_to_integers
Function · 0.85
Calls
1
_relabel_copy
Function · 0.85
Tested by
no test coverage detected