import numpy as np a=np.random.randint(0,10,size=(3,3))#在0-10中随机生成三行三列的data np.argwhere(a>5)#返回值是a中的数据大于5的索引数组