网络编程
位置:首页>> 网络编程>> 网络编程>> numpy返回array中元素的index方法

numpy返回array中元素的index方法

作者:Yunhe_Feng  发布时间:2023-10-04 22:43:10 

标签:numpy,array,index

如下所示:


import numpy
a = numpy.array(([3,2,1],[2,5,7],[4,7,8]))
itemindex = numpy.argwhere(a == 7)
print (itemindex)
print a

来源:https://blog.csdn.net/vernice/article/details/50990919

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com