【发布时间】:2018-07-12 04:34:53
【问题描述】:
I have an array containing some negative values. how can i find the absolute value?
例如假设我的数组是
arr = [-2,-5,0,1,2]
我想要一个数组
arr_out =[2,5,0,1,2]
【问题讨论】:
-
您可以从旧数组创建新数组并将负值转换为正值stackoverflow.com/questions/3854310/…
标签: python-3.x