如何实现删除numpy.array中的行或列
作者:趙大宝 时间:2022-05-09 14:55:03
话不多说,直接上代码吧!
import numpy as np
A = np.delete(A, 1, 0) # 删除A的第二行
B = np.delete(B, 2, 0) # 删除B的第三行
C = np.delete(C, 1, 1) # 删除C的第三列
参考引用:
https://stackoverflow.com/questions/1642730/how-to-delete-columns-in-numpy-array
来源:https://blog.csdn.net/u010412858/article/details/77169764
标签:numpy,array,行,列
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Mongodb基本操作与Python连接mongodb并进行基础操作的方法
2023-10-14 23:55:51
python http通信接口开发示例
2022-06-07 05:15:29
![](https://img.aspxhome.com/file/2023/9/96989_0s.png)
高效的MySQL分页
2011-01-04 20:01:00
Python单元测试简单示例
2021-07-27 12:03:11
CSS实例教程:复合型CSS条状图表(上)
2010-01-23 12:43:00
![](https://img.aspxhome.com/file/UploadPic/20101/23/2010123124715558s.jpg)
十分钟搞定pandas(入门教程)
2023-08-09 01:00:15
![](https://img.aspxhome.com/file/2023/0/63950_0s.jpg)
如何在页面错误时向数据库中添加记录?
2010-06-26 12:26:00
一个提高了近10%转化率的改进
2009-05-22 12:40:00
![](https://img.aspxhome.com/file/UploadPic/20095/22/sampa-400x582-52s.gif)
Python+Opencv实现表格边框线检测
2023-08-11 04:55:14
![](https://img.aspxhome.com/file/2023/1/61971_0s.png)
使用Python创建简单的HTTP服务器的方法步骤
2023-07-17 01:33:27
python3 自动识别usb连接状态,即对usb重连的判断方法
2022-03-10 01:26:21
使用Pytorch+PyG实现MLP的详细过程
2023-05-03 17:48:14
![](https://img.aspxhome.com/file/2023/0/110210_0s.png)
python爬取酷狗音乐排行榜
2021-01-24 19:43:49
python日志模块logbook使用方法
2021-10-02 02:25:50
python实现简单的五子棋游戏
2023-07-30 13:24:31
JS 添加千分位与去掉千分位的示例
2010-08-20 06:18:20
Python爬取网页中的图片(搜狗图片)详解
2023-06-24 00:34:45
![](https://img.aspxhome.com/file/2023/2/70852_0s.jpg)
js数组与字符串的相互转换方法
2023-06-24 09:41:48
Python量化交易实战之使用Resample函数转换“日K”数据
2023-07-30 07:31:11
![](https://img.aspxhome.com/file/2023/2/105232_0s.png)
Python 短视频爬虫教程
2022-02-13 00:17:33
![](https://img.aspxhome.com/file/2023/3/102803_0s.png)