Skip to content

Commit

Permalink
better bfs edge test (dmlc#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
BarclayII authored Nov 12, 2018
1 parent d6c80e0 commit 7cbb83d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/pytorch/test_traversal.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ def toset(x):
return set(x.tolist())

def test_bfs_nodes(n=1000):
g_nx = nx.random_tree(n)
g = dgl.DGLGraph()
a = sp.random(n, n, 10 / n, data_rvs=lambda n: np.ones(n))
g.from_scipy_sparse_matrix(a)
g_nx = g.to_networkx()
g.from_networkx(g_nx)

src = random.choice(range(n))

Expand Down

0 comments on commit 7cbb83d

Please sign in to comment.