Skip to content

Commit

Permalink
fix review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGuge committed Nov 16, 2023
1 parent 4e7926a commit bcda589
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/paddle/tensor/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5837,9 +5837,9 @@ def diagonal_scatter(x, y, offset=0, axis1=0, axis2=1, name=None):
This function returns a tensor with fresh storage.
The argument ``offset`` controls which diagonal to consider:
If ``offset`` = 0, it is the main diagonal.
If ``offset`` > 0, it is above the main diagonal.
If ``offset`` < 0, it is below the main diagonal.
- If ``offset`` = 0, it is the main diagonal.
- If ``offset`` > 0, it is above the main diagonal.
- If ``offset`` < 0, it is below the main diagonal.
Note:
``y`` should have the same shape as paddle.diagonal(x, offset, axis1, axis2).
Expand All @@ -5858,7 +5858,6 @@ def diagonal_scatter(x, y, offset=0, axis1=0, axis2=1, name=None):
Examples:
.. code-block:: python
>>> # doctest: +REQUIRES(env:GPU)
>>> import paddle
>>> x = paddle.arange(6.0).reshape((2, 3))
>>> y = paddle.ones((2,))
Expand Down

0 comments on commit bcda589

Please sign in to comment.