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
9b5d3c79
Commit
9b5d3c79
authored
Oct 18, 2021
by
rusty1s
Browse files
update
parent
238ddb66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
torch_sparse/storage.py
torch_sparse/storage.py
+9
-5
No files found.
torch_sparse/storage.py
View file @
9b5d3c79
...
@@ -56,20 +56,24 @@ class SparseStorage(object):
...
@@ -56,20 +56,24 @@ class SparseStorage(object):
elif
row
is
not
None
and
row
.
numel
()
>
0
:
elif
row
is
not
None
and
row
.
numel
()
>
0
:
M
=
int
(
row
.
max
())
+
1
M
=
int
(
row
.
max
())
+
1
else
:
else
:
M
=
sparse_sizes
[
0
]
_M
=
sparse_sizes
[
0
]
assert
_M
is
not
None
M
=
_M
if
rowptr
is
not
None
:
if
rowptr
is
not
None
:
assert
rowptr
.
numel
()
-
1
==
sparse_sizes
[
0
]
assert
rowptr
.
numel
()
-
1
==
M
elif
row
is
not
None
and
row
.
numel
()
>
0
:
elif
row
is
not
None
and
row
.
numel
()
>
0
:
assert
int
(
row
.
max
())
<
sparse_sizes
[
0
]
assert
int
(
row
.
max
())
<
M
N
:
int
=
0
N
:
int
=
0
if
sparse_sizes
is
None
or
sparse_sizes
[
1
]
is
None
:
if
sparse_sizes
is
None
or
sparse_sizes
[
1
]
is
None
:
if
col
.
numel
()
>
0
:
if
col
.
numel
()
>
0
:
N
=
int
(
col
.
max
())
+
1
N
=
int
(
col
.
max
())
+
1
else
:
else
:
N
=
sparse_sizes
[
1
]
_N
=
sparse_sizes
[
1
]
assert
_N
is
not
None
N
=
_N
if
col
.
numel
()
>
0
:
if
col
.
numel
()
>
0
:
assert
int
(
col
.
max
())
<
sparse_sizes
[
1
]
assert
int
(
col
.
max
())
<
N
sparse_sizes
=
(
M
,
N
)
sparse_sizes
=
(
M
,
N
)
...
...
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