在numpy里有没有功能可以把-0.3333333333变成-0.334的呢。
import numpy as np x = np.array(-0.3333333333) x *= 1e3 # 位数 x = np.floor(x) # 向下取整 x /= 1e3 print(x)