Python的print输出设置

270 阅读1分钟
# 输出不省略
import numpy as np
np.set_printoptions(threshold=np.inf) # threshold 指定超过多少使用省略号,np.inf代表无限大



# 数值不以科学计数法输出
import numpy as np
np.set_printoptions(suppress=True)