Commit af388322 authored by rusty1s's avatar rusty1s
Browse files

sample replace=True test

parent b9f0417d
...@@ -16,3 +16,7 @@ def test_sample_adj(): ...@@ -16,3 +16,7 @@ def test_sample_adj():
assert row.tolist() == [0, 0, 0, 0, 1, 2, 2, 3, 3] assert row.tolist() == [0, 0, 0, 0, 1, 2, 2, 3, 3]
assert col.tolist() == [2, 3, 4, 5, 4, 0, 3, 0, 2] assert col.tolist() == [2, 3, 4, 5, 4, 0, 3, 0, 2]
assert val.tolist() == [5, 6, 7, 8, 9, 10, 11, 12, 13] assert val.tolist() == [5, 6, 7, 8, 9, 10, 11, 12, 13]
out, n_id = sample_adj(adj_t, torch.arange(2, 6), num_neighbors=2,
replace=True)
assert out.nnz() == 8
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