numpy库的常用方法时间:2023-03-08 17:07:21 np.abs() 计算数组各元素的绝对值1 a= [0,1,2,3,4,-5,9,-3,12,-4] np.abs(a)out: array([ 0, 1, 2, 3, 4, 5, 9, 3, 12, 4])