Skip to content

Commit 4a5379c

Browse files
authored
Merge pull request #96 from innerlee/zz/dim
Fix: dim should be int
2 parents 48024c1 + 41955ed commit 4a5379c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch_scatter/utils/gen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
def maybe_dim_size(index, dim_size=None):
99
if dim_size is not None:
1010
return dim_size
11-
return index.max().item() + 1 if index.numel() > 0 else 0
11+
dim = index.max().item() + 1 if index.numel() > 0 else 0
12+
return int(dim)
1213

1314

1415
def broadcast(src, index, dim):

0 commit comments

Comments
 (0)