Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-sparse
Commits
fe35bc61
Commit
fe35bc61
authored
Nov 09, 2020
by
rusty1s
Browse files
sample replace=False test
parent
af388322
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
test/test_sample.py
test/test_sample.py
+4
-0
No files found.
test/test_sample.py
View file @
fe35bc61
...
@@ -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...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment