Skip to content

Commit 18bd8b6

Browse files
authored
Fix reduce in dim=0
1 parent 0a60df3 commit 18bd8b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch_sparse/reduce.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def reduction(src: SparseTensor, dim: Optional[int] = None,
3535

3636
if dim == 0 and value is not None:
3737
col = src.storage.col()
38-
return scatter(value, col, dim=0, dim_size=src.size(0))
38+
return scatter(value, col, 0, None, src.size(1), reduce)
3939
elif dim == 0 and value is None:
4040
if reduce == 'sum' or reduce == 'add':
4141
return src.storage.colcount().to(src.dtype())

0 commit comments

Comments
 (0)