Skip to content

Commit 4c8a415

Browse files
committed
fix default value for matmul
1 parent 2eff407 commit 4c8a415

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

torch_sparse/matmul.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def matmul(src: SparseTensor, other: Union[torch.Tensor, SparseTensor],
109109
raise ValueError
110110

111111

112-
SparseTensor.spmm = lambda self, other, reduce=None: spmm(self, other, reduce)
113-
SparseTensor.spspmm = lambda self, other, reduce=None: spspmm(
112+
SparseTensor.spmm = lambda self, other, reduce="sum": spmm(self, other, reduce)
113+
SparseTensor.spspmm = lambda self, other, reduce="sum": spspmm(
114114
self, other, reduce)
115-
SparseTensor.matmul = lambda self, other, reduce=None: matmul(
115+
SparseTensor.matmul = lambda self, other, reduce="sum": matmul(
116116
self, other, reduce)
117117
SparseTensor.__matmul__ = lambda self, other: matmul(self, other, 'sum')

0 commit comments

Comments
 (0)