Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dmlc/dgl
/ generate_rand_graph
Function
generate_rand_graph
tests/python/common/data/test_serialize.py:19–23 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
17
18
19
def
generate_rand_graph(n):
20
arr = (sp.sparse.random(n, n, density=0.1, format=
"coo"
) != 0).astype(
21
np.int64
22
)
23
return
dgl.from_scipy(arr)
24
25
26
def
construct_graph(n):
Callers
4
construct_graph
Function · 0.85
test_graph_serialize_without_feature
Function · 0.85
test_graph_serialize_with_labels
Function · 0.85
test_graph_serialize_with_formats
Function · 0.85
Calls
1
astype
Method · 0.45
Tested by
no test coverage detected