numpy返回array中元素的index方法
作者:Yunhe_Feng 时间:2023-10-04 22:43:10
如下所示:
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
标签:numpy,array,index
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python全栈之字符串和列表相关操作
2022-02-04 04:15:25
![](https://img.aspxhome.com/file/2023/7/109967_0s.png)
vue实现小球滑动交叉效果
2024-04-30 10:30:09
基于h5py的使用及数据封装代码
2021-10-22 08:45:39
Python中使用第三方库xlutils来追加写入Excel文件示例
2022-05-23 10:04:11
vue+springboot实现项目的CORS跨域请求
2024-05-09 09:48:23
![](https://img.aspxhome.com/file/2023/5/127175_0s.png)
Python Request类源码实现方法及原理解析
2021-03-23 02:23:50
![](https://img.aspxhome.com/file/2023/9/112569_0s.jpg)
又一个仿alert提示效果
2007-12-24 17:34:00
![](https://img.aspxhome.com/file/UploadPic/200712/24/20071224173935223s.jpg)
python生成随机验证码(中文验证码)示例
2022-07-28 05:41:58
Python使用Crypto库实现加密解密的示例详解
2021-11-10 05:53:10
![](https://img.aspxhome.com/file/2023/7/95687_0s.png)
python中Task封装协程的知识点总结
2022-10-25 13:25:02
python分批定量读取文件内容,输出到不同文件中的方法
2021-10-05 21:29:30
python程序 线程队列queue使用方法解析
2021-11-16 18:43:02
vue解决跨域路由冲突问题思路解析
2024-04-28 09:32:05
教你怎么用Python生成九宫格照片
2023-12-02 17:20:51
![](https://img.aspxhome.com/file/2023/7/110417_0s.jpg)
关于Javascript闭包与应用的详解
2024-04-23 09:09:28
![](https://img.aspxhome.com/file/2023/6/135906_0s.png)
简单的命令查看安装的python版本号
2022-03-12 17:23:06
![](https://img.aspxhome.com/file/2023/8/88838_0s.png)
numpy.transpose()实现数组的转置例子
2021-11-14 13:24:55
seo网站如何实现301跳转?
2010-01-15 12:59:00
asp入门之字符串函数介绍示例
2008-11-04 20:18:00
python 爬取国内小说网站
2022-11-30 16:02:04