numpy.
array_str
返回数组中数据的字符串表示形式。
数组中的数据作为单个字符串返回。此功能类似于 array_repr 不同的是 array_repr 还返回关于数组类型及其数据类型的信息。
array_repr
输入数组。
如果文本长度超过 max_line_width .默认为 numpy.get_printoptions()['linewidth'] .
numpy.get_printoptions()['linewidth']
浮点精度。默认为 numpy.get_printoptions()['precision'] .
numpy.get_printoptions()['precision']
将“非常接近”零的数字表示为零;默认值为False。非常接近是由精度定义的:如果精度是8,例如,小于5e-9的数字(绝对值)表示为零。默认为 numpy.get_printoptions()['suppress'] .
numpy.get_printoptions()['suppress']
参见
array2string
set_printoptions
实例
>>> np.array_str(np.arange(3)) '[0 1 2]'