Skip to content

Commit 41955ed

Browse files
committed
fix: dim shoud be int
Signed-off-by: lizz <[email protected]>
1 parent 48024c1 commit 41955ed

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)