From bcda589e4c17de15d14439c89e1405d3e06c4ff1 Mon Sep 17 00:00:00 2001 From: wucc <77946882+DanGuge@users.noreply.github.com> Date: Thu, 16 Nov 2023 21:01:16 +0800 Subject: [PATCH] fix review suggestions --- python/paddle/tensor/manipulation.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index 036777cc3f8ba..0e66befc7ecdc 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -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). @@ -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,))