mindspore.numpy.array_str
- mindspore.numpy.array_str(a)[源代码]
- Returns a string representation of the data in an array. - The data in the array is returned as a single string. This function is similar to array_repr, the difference being that array_repr also returns information on the kind of array and its data type. - 说明 - Numpy argument max_line_width, precision and suppress_small are not supported. Graph mode does not support the function. - 参数
- a (Tensor) – Input data. 
- 返回
- String. 
 - Supported Platforms:
- Ascend- GPU- CPU
 - 异常
- TypeError – If input is not tensor. 
 - 样例 - >>> import mindspore.numpy as np >>> x = np.arange(5) >>> np.array_str(x) '[0 1 2 3 4]'