Skip to content

Commit 6325450

Browse files
committed
doc fixes
1 parent e9131ed commit 6325450

File tree

16 files changed

+55
-61
lines changed

16 files changed

+55
-61
lines changed

build.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import os.path as osp
2-
import shutil
32
import subprocess
43

54
import torch
65
from torch.utils.ffi import create_extension
76

8-
if osp.exists('build'):
9-
shutil.rmtree('build')
10-
117
headers = ['torch_scatter/src/cpu.h']
128
sources = ['torch_scatter/src/cpu.c']
139
include_dirs = ['torch_scatter/src']

docs/source/conf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import os
2-
import sys
31
import datetime
42
import sphinx_rtd_theme
53
import doctest
64

7-
sys.path.insert(0, os.path.abspath('../..'))
8-
95
from torch_scatter import __version__ # noqa
106

117
extensions = [

docs/source/functions/add.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Scatter Add
33

44
.. automodule:: torch_scatter
55

6-
.. autofunction:: scatter_add_
76
.. autofunction:: scatter_add

docs/source/functions/div.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Scatter Div
33

44
.. automodule:: torch_scatter
55

6-
.. autofunction:: scatter_div_
76
.. autofunction:: scatter_div

docs/source/functions/max.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Scatter Max
33

44
.. automodule:: torch_scatter
55

6-
.. autofunction:: scatter_max_
76
.. autofunction:: scatter_max

docs/source/functions/mean.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Scatter Mean
33

44
.. automodule:: torch_scatter
55

6-
.. autofunction:: scatter_mean_
76
.. autofunction:: scatter_mean

docs/source/functions/min.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Scatter Min
33

44
.. automodule:: torch_scatter
55

6-
.. autofunction:: scatter_min_
76
.. autofunction:: scatter_min

docs/source/functions/mul.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Scatter Mul
33

44
.. automodule:: torch_scatter
55

6-
.. autofunction:: scatter_mul_
76
.. autofunction:: scatter_mul

docs/source/functions/sub.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Scatter Sub
33

44
.. automodule:: torch_scatter
55

6-
.. autofunction:: scatter_sub_
76
.. autofunction:: scatter_sub

torch_scatter/add.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def scatter_add(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
5050
.. math::
5151
\mathrm{out}_i = \mathrm{out}_i + \sum_j \mathrm{src}_j
5252
53-
where :math:`\sum` is over :math:`j` such that
53+
where :math:`\sum_j` is over :math:`j` such that
5454
:math:`\mathrm{index}_j = i`.
5555
5656
Args:
@@ -75,17 +75,19 @@ def scatter_add(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
7575
.. testcode::
7676
7777
from torch_scatter import scatter_add
78+
7879
src = torch.tensor([[2, 0, 1, 4, 3], [0, 2, 1, 3, 4]])
7980
index = torch.tensor([[4, 5, 4, 2, 3], [0, 0, 2, 2, 1]])
8081
out = src.new_zeros((2, 6))
82+
8183
out = scatter_add(src, index, out=out)
84+
8285
print(out)
8386
8487
.. testoutput::
8588
86-
0 0 4 3 3 0
87-
2 4 4 0 0 0
88-
[torch.FloatTensor of size 2x6]
89+
tensor([[ 0, 0, 4, 3, 3, 0],
90+
[ 2, 4, 4, 0, 0, 0]])
8991
"""
9092
src, out, index, dim = gen(src, index, dim, out, dim_size, fill_value)
9193
return ScatterAdd.apply(out, src, index, dim)

0 commit comments

Comments
 (0)