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-scatter
Commits
880c8102
Commit
880c8102
authored
Dec 17, 2017
by
rusty1s
Browse files
typo
parent
c3bacf3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
torch_scatter/functions/scatter.py
torch_scatter/functions/scatter.py
+3
-1
No files found.
torch_scatter/functions/scatter.py
View file @
880c8102
...
@@ -9,8 +9,10 @@ from .._ext import ffi
...
@@ -9,8 +9,10 @@ from .._ext import ffi
def
_scatter
(
name
,
dim
,
*
data
):
def
_scatter
(
name
,
dim
,
*
data
):
a
,
b
,
c
=
data
[:
3
]
a
,
b
,
c
=
data
[:
3
]
# Assert
same
dimension
ality acros
s al
l inputs
.
# Assert
index
dimension
i
s
v
al
id
.
assert
dim
>=
0
and
dim
<
a
.
dim
(),
'Index dimension is out of bounds'
assert
dim
>=
0
and
dim
<
a
.
dim
(),
'Index dimension is out of bounds'
# Assert same dimensionality across all inputs.
assert
b
.
dim
()
==
c
.
dim
(),
(
'Index tensor must have same dimensions as '
assert
b
.
dim
()
==
c
.
dim
(),
(
'Index tensor must have same dimensions as '
'input tensor'
)
'input tensor'
)
assert
a
.
dim
()
==
c
.
dim
(),
(
'Input tensor must have same dimensions as '
assert
a
.
dim
()
==
c
.
dim
(),
(
'Input tensor must have same dimensions as '
...
...
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