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
c0805819
Unverified
Commit
c0805819
authored
Oct 17, 2021
by
Feng Shi
Committed by
GitHub
Oct 17, 2021
Browse files
Update storage.py
BUG: when sparse_sizes is passed with (None, None), this causes an error
parent
709f6837
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_sparse/storage.py
torch_sparse/storage.py
+1
-1
No files found.
torch_sparse/storage.py
View file @
c0805819
...
@@ -48,7 +48,7 @@ class SparseStorage(object):
...
@@ -48,7 +48,7 @@ class SparseStorage(object):
assert
col
.
dim
()
==
1
assert
col
.
dim
()
==
1
col
=
col
.
contiguous
()
col
=
col
.
contiguous
()
if
sparse_sizes
is
None
:
if
sparse_sizes
is
None
or
sparse_sizes
[
0
]
is
None
or
sparse_sizes
[
1
]
is
None
:
if
rowptr
is
not
None
:
if
rowptr
is
not
None
:
M
=
rowptr
.
numel
()
-
1
M
=
rowptr
.
numel
()
-
1
elif
row
is
not
None
and
row
.
numel
()
>
0
:
elif
row
is
not
None
and
row
.
numel
()
>
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