MCPcopy
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
19def 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
26def construct_graph(n):

Calls 1

astypeMethod · 0.45

Tested by

no test coverage detected