From 709e5e50a477b094501862d5b697be5fe36466f4 Mon Sep 17 00:00:00 2001 From: Jiaqi Date: Mon, 9 Nov 2020 16:32:13 +0800 Subject: [PATCH] modify example --- mindspore/ops/operations/array_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ops/operations/array_ops.py b/mindspore/ops/operations/array_ops.py index 5138bbd074..d8566a6a47 100644 --- a/mindspore/ops/operations/array_ops.py +++ b/mindspore/ops/operations/array_ops.py @@ -2902,7 +2902,7 @@ class ScatterSub(_ScatterOp): Examples: >>> input_x = Parameter(Tensor(np.array([[0.0, 0.0, 0.0], [1.0, 1.0, 1.0]]), mindspore.float32), name="x") >>> indices = Tensor(np.array([[0, 1]]), mindspore.int32) - >>> updates = Tensor(np.array([[1.0, 1.0, 1.0], [2.0, 2.0, 2.0]]), mindspore.float32) + >>> updates = Tensor(np.array([[[1.0, 1.0, 1.0], [2.0, 2.0, 2.0]]]), mindspore.float32) >>> scatter_sub = P.ScatterSub() >>> output = scatter_sub(input_x, indices, updates) [[-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0]]