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
fc183212
Commit
fc183212
authored
Jan 20, 2020
by
rusty1s
Browse files
typos
parent
96b0abcb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
torch_sparse/diag.py
torch_sparse/diag.py
+1
-2
No files found.
torch_sparse/diag.py
View file @
fc183212
...
@@ -46,7 +46,6 @@ def set_diag(src, value=None, k=0):
...
@@ -46,7 +46,6 @@ def set_diag(src, value=None, k=0):
func
=
diag_cuda
if
index
.
is_cuda
else
diag_cpu
func
=
diag_cuda
if
index
.
is_cuda
else
diag_cpu
mask
=
func
.
non_diag_mask
(
index
,
src
.
size
(
0
),
src
.
size
(
1
),
k
)
mask
=
func
.
non_diag_mask
(
index
,
src
.
size
(
0
),
src
.
size
(
1
),
k
)
inv_mask
=
~
mask
inv_mask
=
~
mask
new_index
=
index
.
new_empty
((
2
,
mask
.
size
(
0
)))
new_index
=
index
.
new_empty
((
2
,
mask
.
size
(
0
)))
...
@@ -76,7 +75,7 @@ def set_diag(src, value=None, k=0):
...
@@ -76,7 +75,7 @@ def set_diag(src, value=None, k=0):
colcount
=
src
.
storage
.
colcount
.
clone
()
colcount
=
src
.
storage
.
colcount
.
clone
()
colcount
[
start
+
k
:
start
+
num_diag
+
k
]
+=
1
colcount
[
start
+
k
:
start
+
num_diag
+
k
]
+=
1
storage
=
src
.
storage
.
__class__
(
index
,
value
,
storage
=
src
.
storage
.
__class__
(
new_
index
,
new_
value
,
sparse_size
=
src
.
sparse_size
(),
sparse_size
=
src
.
sparse_size
(),
rowcount
=
rowcount
,
colcount
=
colcount
,
rowcount
=
rowcount
,
colcount
=
colcount
,
is_sorted
=
True
)
is_sorted
=
True
)
...
...
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