a1 = np.array([1.4,2.5,2.6],dtype='float64')
print(a1.round(0))
a2 = np.array([2.5,2.51,2.501,2.50000001],dtype='float64')
print(a2.round(0))
######### 输出 ################
[1. 2. 3.]
[2. 3. 3. 3.]
具体对比知晓 :
绝对的临界值并没有五入!但只要打破绝对的临界值,增加一点点小数就可以"五入"。