一、控制计算精度round() import numpy as np x = np.round(x, a) # 对变量x保留小数点后a位 numpy对矩阵的操作:【Python】numpy矩阵运算大全 ~~未完待续