Skip to content

Commit c0e1a8b

Browse files
Changes in the documentation of segment_csr
Hi, I think the top index of the sum is not right in the documentation of segment_csr. I might be wrong though!
1 parent 335525a commit c0e1a8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch_scatter/segment_csr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def segment_csr(src: torch.Tensor, indptr: torch.Tensor,
6464
6565
.. math::
6666
\mathrm{out}_i =
67-
\sum_{j = \mathrm{indptr}[i]}^{\mathrm{indptr}[i+i]}~\mathrm{src}_j.
67+
\sum_{j = \mathrm{indptr}[i]}^{\mathrm{indptr}[i+1]-1}~\mathrm{src}_j.
6868
6969
Due to the use of index pointers, :meth:`segment_csr` is the fastest
7070
method to apply for grouped reductions.

0 commit comments

Comments
 (0)