From b82d40ee3e713f29636e7f1f012820ebca1b86cf Mon Sep 17 00:00:00 2001 From: zqw_1997 <118182234+zhengqiwen1997@users.noreply.github.com> Date: Wed, 12 Apr 2023 20:56:51 +0800 Subject: [PATCH] test=allcase (#2139) --- framework/api/paddlebase/test_prod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/api/paddlebase/test_prod.py b/framework/api/paddlebase/test_prod.py index 9cdc90eb36..c9972b9af8 100644 --- a/framework/api/paddlebase/test_prod.py +++ b/framework/api/paddlebase/test_prod.py @@ -157,7 +157,7 @@ def test_prod10(): x = np.array([[-0.8, -0.4], [0.7, 0.9]]) axis = 1 res = np.prod(x, axis=axis) - exp = paddle.prod(paddle.to_tensor(x), axis=paddle.to_tensor(axis)) + exp = paddle.prod(paddle.to_tensor(x), axis=paddle.to_tensor([axis])) assert np.allclose(exp.numpy(), res)