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
4a5379c4
Unverified
Commit
4a5379c4
authored
Jan 12, 2020
by
Matthias Fey
Committed by
GitHub
Jan 12, 2020
Browse files
Merge pull request #96 from innerlee/zz/dim
Fix: dim should be int
parents
48024c15
41955edc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torch_scatter/utils/gen.py
torch_scatter/utils/gen.py
+2
-1
No files found.
torch_scatter/utils/gen.py
View file @
4a5379c4
...
...
@@ -8,7 +8,8 @@ import torch
def
maybe_dim_size
(
index
,
dim_size
=
None
):
if
dim_size
is
not
None
:
return
dim_size
return
index
.
max
().
item
()
+
1
if
index
.
numel
()
>
0
else
0
dim
=
index
.
max
().
item
()
+
1
if
index
.
numel
()
>
0
else
0
return
int
(
dim
)
def
broadcast
(
src
,
index
,
dim
):
...
...
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