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
af388322
Commit
af388322
authored
Nov 09, 2020
by
rusty1s
Browse files
sample replace=True test
parent
b9f0417d
Changes
1
Hide 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 @
af388322
...
...
@@ -16,3 +16,7 @@ def test_sample_adj():
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
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
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