Commit fe35bc61 authored by rusty1s's avatar rusty1s
Browse files

sample replace=False test

parent af388322
...@@ -20,3 +20,7 @@ def test_sample_adj(): ...@@ -20,3 +20,7 @@ def test_sample_adj():
out, n_id = sample_adj(adj_t, torch.arange(2, 6), num_neighbors=2, out, n_id = sample_adj(adj_t, torch.arange(2, 6), num_neighbors=2,
replace=True) replace=True)
assert out.nnz() == 8 assert out.nnz() == 8
out, n_id = sample_adj(adj_t, torch.arange(2, 6), num_neighbors=2,
replace=False)
assert out.nnz() == 7 # node 3 has only one edge...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment