From deb40f0698551e1de68f4f1319193bc04ec61cc2 Mon Sep 17 00:00:00 2001 From: Shang Zhizhou Date: Fri, 10 Sep 2021 15:42:27 +0800 Subject: [PATCH] fix api doc of paddle.any' (#35631) --- python/paddle/tensor/math.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index 298ee031a97..b121e0ecf96 100755 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -2381,17 +2381,17 @@ def any(x, axis=None, keepdim=False, name=None): out1 = paddle.any(x) # [True] print(out1) - # out2 should be [True, False] - out2 = paddle.any(x, axis=0) # [True, False] + # out2 should be [True, True] + out2 = paddle.any(x, axis=0) # [True, True] print(out2) - # keep_dim=False, out3 should be [True, False], out.shape should be (2,) - out3 = paddle.any(x, axis=-1) # [True, False] + # keep_dim=False, out3 should be [True, True], out.shape should be (2,) + out3 = paddle.any(x, axis=-1) # [True, True] print(out3) - # keep_dim=True, result should be [[True], [False]], out.shape should be (2,1) + # keep_dim=True, result should be [[True], [True]], out.shape should be (2,1) out4 = paddle.any(x, axis=1, keepdim=True) - out4 = paddle.cast(out4, 'int32') # [[True], [False]] + out4 = paddle.cast(out4, 'int32') # [[True], [True]] print(out4) """ -- GitLab