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
9c52a524
Commit
9c52a524
authored
Jun 15, 2020
by
rusty1s
Browse files
linting
parent
3c415d25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
test/test_eye.py
test/test_eye.py
+0
-1
torch_sparse/tensor.py
torch_sparse/tensor.py
+2
-1
No files found.
test/test_eye.py
View file @
9c52a524
from
itertools
import
product
from
itertools
import
product
import
pytest
import
pytest
import
torch
from
torch_sparse.tensor
import
SparseTensor
from
torch_sparse.tensor
import
SparseTensor
from
.utils
import
dtypes
,
devices
from
.utils
import
dtypes
,
devices
...
...
torch_sparse/tensor.py
View file @
9c52a524
...
@@ -397,7 +397,8 @@ class SparseTensor(object):
...
@@ -397,7 +397,8 @@ class SparseTensor(object):
return
mat
return
mat
def
to_torch_sparse_coo_tensor
(
self
,
dtype
:
Optional
[
int
]
=
None
):
def
to_torch_sparse_coo_tensor
(
self
,
dtype
:
Optional
[
int
]
=
None
)
->
torch
.
Tensor
:
row
,
col
,
value
=
self
.
coo
()
row
,
col
,
value
=
self
.
coo
()
index
=
torch
.
stack
([
row
,
col
],
dim
=
0
)
index
=
torch
.
stack
([
row
,
col
],
dim
=
0
)
...
...
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