MCPcopy
hub / github.com/dmlc/dgl / create_large_graph

Function create_large_graph

tests/python/common/transforms/test_transform.py:687–693  ·  view source on GitHub ↗
(num_nodes, idtype=F.int64)

Source from the content-addressed store, hash-verified

685
686
687def create_large_graph(num_nodes, idtype=F.int64):
688 row = np.random.choice(num_nodes, num_nodes * 10)
689 col = np.random.choice(num_nodes, num_nodes * 10)
690 spm = spsp.coo_matrix((np.ones(len(row)), (row, col)))
691 spm.sum_duplicates()
692
693 return dgl.from_scipy(spm, idtype=idtype)
694
695
696# Disabled since everything will be on heterogeneous graphs

Callers 4

test_partition_with_haloFunction · 0.85
test_metis_partitionFunction · 0.85
test_reorder_nodesFunction · 0.85
test_reorder_graphFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected