python很好用的方法

1、选取数组中最小最大数(可多维数组)

数组:a

b=np.min(a)

2、已知数组中某个元素的值,找到此元素在数组中的索引

print(where(a==mp.min(a))

https://blog.csdn.net/songyunli1111/article/details/79322103

posted @ 2019-05-12 11:14  甜汤  阅读(191)  评论(0编辑  收藏  举报