forked from huawei/mindspore2022
!32180 [MD] fix chn doc issue 2
Merge pull request !32180 from liyong126/code_docs_fix_chn_issue_2
This commit is contained in:
commit
ebcfa20e21
|
|
@ -9,12 +9,12 @@ mindspore.dataset.transforms.c_transforms.Slice
|
|||
|
||||
- **slices** ((Union[int, list[int], slice, None, Ellipsis]) - 指定切片的信息,可以为
|
||||
|
||||
- 1. :py:obj:'int': 沿着第一个维度切片对索引进行切片,支持负索引。
|
||||
- 2. :py:obj:'list(int)': 沿着第一个维度切片所有索引进行切片,支持负号索引。
|
||||
- 3. :py:obj:'slice': 沿着第一个维度对 `slice <https://docs.python.org/zh-cn/3.7/library/functions.html?highlight=slice#slice>`_ 对象生成的索引进行切片。
|
||||
- 4. :py:obj:'None': 切片整个维度,类似于Python索引中的语法:py:obj:'[:]'。
|
||||
- 5. :py:obj:'Ellipsis': 切片整个维度,效果与 `None` 相同。
|
||||
- 1. :py:obj:`int`: 沿着第一个维度切片对索引进行切片,支持负索引。
|
||||
- 2. :py:obj:`list(int)`: 沿着第一个维度切片所有索引进行切片,支持负号索引。
|
||||
- 3. :py:obj:`slice`: 沿着第一个维度对 `slice <https://docs.python.org/zh-cn/3.7/library/functions.html?highlight=slice#slice>`_ 对象生成的索引进行切片。
|
||||
- 4. :py:obj:`None`: 切片整个维度,类似于Python索引中的语法:py:obj:'[:]'。
|
||||
- 5. :py:obj:`Ellipsis`: 切片整个维度,效果与 `None` 相同。
|
||||
|
||||
**异常:**
|
||||
|
||||
- **TypeError** - 参数 `slices` 类型不为int、list[int]、:py:obj:'slice'、:py:obj:'None'或:py:obj:'Ellipsis'。
|
||||
- **TypeError** - 参数 `slices` 类型不为int、list[int]、:py:obj:`slice`、:py:obj:`None`或:py:obj:`Ellipsis`。
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class Slice(TensorOperation):
|
|||
5. :py:obj:`Ellipsis`: Slice the whole dimension, same result with `None`.
|
||||
|
||||
Raises:
|
||||
TypeError: If `slices` is not of type int, list[int], :py:obj:'slice', :py:obj:'None' or :py:obj:'Ellipsis'.
|
||||
TypeError: If `slices` is not of type int, list[int], :py:obj:`slice`, :py:obj:`None` or :py:obj:`Ellipsis`.
|
||||
|
||||
Supported Platforms:
|
||||
``CPU``
|
||||
|
|
|
|||
Loading…
Reference in New Issue