Skip to content

Commit e91e08a

Browse files
committed
change position
1 parent 999ce3b commit e91e08a

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

python/paddle/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,13 +1184,13 @@
11841184
'renorm',
11851185
'renorm_',
11861186
'take_along_axis',
1187-
'scatter_add_',
11881187
'put_along_axis',
11891188
'select_scatter',
11901189
'multigammaln',
11911190
'multigammaln_',
11921191
'nan_to_num',
11931192
'nan_to_num_',
1193+
'scatter_add_',
11941194
'heaviside',
11951195
'tril_indices',
11961196
'index_add',

python/paddle/tensor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,13 +805,13 @@
805805
'moveaxis',
806806
'repeat_interleave',
807807
'take_along_axis',
808-
'scatter_add_',
809808
'put_along_axis',
810809
'select_scatter',
811810
'put_along_axis_',
812811
'bernoulli_',
813812
'exponential_',
814813
'heaviside',
814+
'scatter_add_',
815815
'index_add',
816816
"index_add_",
817817
'index_put',

python/paddle/tensor/manipulation.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6871,22 +6871,6 @@ def take_along_axis(
68716871
return result
68726872

68736873

6874-
def scatter_add_(
6875-
input: Tensor,
6876-
dim: int,
6877-
index: Tensor,
6878-
src: Tensor,
6879-
) -> Tensor:
6880-
"""
6881-
Inplace version of ``scatter_add`` API, the output Tensor will be inplaced with input ``input``.
6882-
Please refer to :ref:`api_paddle_scatter_add`.
6883-
"""
6884-
6885-
return put_along_axis_(
6886-
input, index, src, dim, 'add', include_self=True, broadcast=False
6887-
)
6888-
6889-
68906874
def put_along_axis(
68916875
arr: Tensor,
68926876
indices: Tensor,
@@ -7137,6 +7121,22 @@ def put_along_axis_(
71377121
)
71387122

71397123

7124+
def scatter_add_(
7125+
input: Tensor,
7126+
dim: int,
7127+
index: Tensor,
7128+
src: Tensor,
7129+
) -> Tensor:
7130+
"""
7131+
Inplace version of ``scatter_add`` API, the output Tensor will be inplaced with input ``input``.
7132+
Please refer to :ref:`api_paddle_scatter_add`.
7133+
"""
7134+
7135+
return put_along_axis_(
7136+
input, index, src, dim, 'add', include_self=True, broadcast=False
7137+
)
7138+
7139+
71407140
def index_add(
71417141
x: Tensor, index: Tensor, axis: int, value: Tensor, name: str | None = None
71427142
) -> Tensor:

0 commit comments

Comments
 (0)