diff --git a/docs/api/api_python/mindspore/mindspore.Tensor.rst b/docs/api/api_python/mindspore/mindspore.Tensor.rst index 746373c6f98..465e14e6e42 100644 --- a/docs/api/api_python/mindspore/mindspore.Tensor.rst +++ b/docs/api/api_python/mindspore/mindspore.Tensor.rst @@ -1083,7 +1083,7 @@ mindspore.Tensor - **TypeError** - `self` 不是Tensor,或者 `axis` 和 `keepdims` 具有前面未指定的类型。 - .. py:method:: random_categorical(num_sample=None, seed=0, dtype=mstype.int64) + .. py:method:: random_categorical(num_sample, seed=0, dtype=mstype.int64) 从分类分布中抽取样本。 diff --git a/docs/api/api_python/ops/mindspore.ops.MaskedFill.rst b/docs/api/api_python/ops/mindspore.ops.MaskedFill.rst index cf995ada678..ef80a8e16ef 100644 --- a/docs/api/api_python/ops/mindspore.ops.MaskedFill.rst +++ b/docs/api/api_python/ops/mindspore.ops.MaskedFill.rst @@ -1,7 +1,7 @@ mindspore.ops.MaskedFill ========================= -.. py:class:: mindspore.ops.MaskedFill(input_x, mask, value) +.. py:class:: mindspore.ops.MaskedFill() 将掩码位置为True的位置填充指定的值。 diff --git a/mindspore/python/mindspore/common/tensor.py b/mindspore/python/mindspore/common/tensor.py index 5a75a64e907..3047da930db 100644 --- a/mindspore/python/mindspore/common/tensor.py +++ b/mindspore/python/mindspore/common/tensor.py @@ -3367,12 +3367,11 @@ class Tensor(Tensor_): the variable `input_params` refers to input tensor. Note: - 1.The value of `input_indices` must be in the range of `[0, input_param.shape[axis])`, the result - is undefined out of range. - - 2.The data type of `input_params` cannot be - `bool_ `_ on Ascend - platform currently. + 1. The value of `input_indices` must be in the range of `[0, input_param.shape[axis])`, the result + is undefined out of range. + 2. The data type of `input_params` cannot be + `bool_ `_ on Ascend + platform currently. Args: input_indices (Tensor): Index tensor to be sliced, the shape of tensor is :math:`(y_1, y_2, ..., y_S)`.