diff --git a/mindspore/dataset/text/utils.py b/mindspore/dataset/text/utils.py index 1dc3012ce95..3a1eeaea8eb 100644 --- a/mindspore/dataset/text/utils.py +++ b/mindspore/dataset/text/utils.py @@ -217,7 +217,7 @@ def to_str(array, encoding='utf8'): Args: array (numpy.ndarray): Array of type `bytes` representing strings. - encoding (string): Indicating the charset for decoding. + encoding (str): Indicating the charset for decoding. Returns: numpy.ndarray, numpy array of `str`. diff --git a/mindspore/dataset/transforms/c_transforms.py b/mindspore/dataset/transforms/c_transforms.py index b99e6a69d7b..910c56182c1 100644 --- a/mindspore/dataset/transforms/c_transforms.py +++ b/mindspore/dataset/transforms/c_transforms.py @@ -78,9 +78,9 @@ class Slice(cde.SliceOp): (Currently only rank-1 tensors are supported). Args: - *slices(Variable length argument list, supported types are, int, list(int), slice, None or Ellipses): - Maximum `n` number of arguments to slice a tensor of rank `n`. - One object in slices can be one of: + slices(Variable length argument list, supported types are, int, list[int], slice, None or Ellipses): + Maximum `n` number of arguments to slice a tensor of rank `n`, one object in slices can be one of: + 1. :py:obj:`int`: Slice this index only. Negative index is supported. 2. :py:obj:`list(int)`: Slice these indices ion the list only. Negative indices are supported. 3. :py:obj:`slice`: Slice the generated indices from the slice object. Similar to `start:stop:step`. diff --git a/mindspore/dataset/transforms/vision/py_transforms.py b/mindspore/dataset/transforms/vision/py_transforms.py index 07630b96cc9..7b994c31174 100644 --- a/mindspore/dataset/transforms/vision/py_transforms.py +++ b/mindspore/dataset/transforms/vision/py_transforms.py @@ -100,7 +100,7 @@ class ToTensor: The range of channel dimension remains the same. Args: - output_type (numpy datatype, optional): The datatype of the numpy output (default=np.float32). + output_type (numpy datatype, optional): The datatype of the numpy output (default=numpy.float32). Examples: >>> py_transforms.ComposeOp([py_transforms.Decode(), @@ -129,7 +129,7 @@ class ToType: Convert the input Numpy image array to desired numpy dtype. Args: - output_type (numpy datatype): The datatype of the numpy output. e.g. np.float32. + output_type (numpy datatype): The datatype of the numpy output, e.g. numpy.float32. Examples: >>> import numpy as np