!28680 Modify API Note

Merge pull request !28680 from liuyang/code_docs_api
This commit is contained in:
i-robot 2022-01-10 06:33:50 +00:00 committed by Gitee
commit e691fedf3f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 6 deletions

View File

@ -390,7 +390,7 @@ class Parameter(Tensor_):
@property
def unique(self):
"""whether the parameter is already unique or not."""
"""Whether the parameter is already unique or not."""
return self._unique
@unique.setter
@ -524,7 +524,7 @@ class Parameter(Tensor_):
Set Parameter's data.
Args:
data (Union[Tensor, int, float]): new data.
data (Union[Tensor, int, float]): New data.
slice_shape (bool): If slice the parameter is set to true, the shape is not checked for consistency.
Default: False.

View File

@ -1669,7 +1669,7 @@ class Tensor(Tensor_):
Tensor, if Tensor is 2-D, return a 1-D Tensor containing the diagonal.
Raises:
ValueError: if the input tensor has less than two dimensions.
ValueError: If the input tensor has less than two dimensions.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1805,7 +1805,7 @@ class Tensor(Tensor_):
Tensor, the indexed result.
Raises:
ValueError: if `axis` is out of range, or `mode` has values other than ('raise', 'wrap', 'clip')
ValueError: If `axis` is out of range, or `mode` has values other than ('raise', 'wrap', 'clip')
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1876,7 +1876,7 @@ class Tensor(Tensor_):
``Ascend`` ``GPU`` ``CPU``
Raises:
ValueError: if the input tensor and any of the `choices` cannot be broadcast.
ValueError: If the input tensor and any of the `choices` cannot be broadcast.
Examples:
>>> import numpy as np
@ -1944,7 +1944,7 @@ class Tensor(Tensor_):
Tensor, array of insertion points with the same shape as `v`.
Raises:
ValueError: if argument for `side` or `sorter` is invalid.
ValueError: If argument for `side` or `sorter` is invalid.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``