当前位置:网站首页>numpy中选择特定两行
numpy中选择特定两行
2022-07-19 05:15:00 【lyz_fish】
import numpy as np
matrix = [[1,2,3,4],[5,6,7,8],[4,5,6,7],[4,3,2,1]]]
#比如取第一行和第三行
matrix = np.array(matrix)#转换为array格式
matrix[[0,2],:]
print(matrix)
out : [[1,2,3,4],[4,5,6,7]]
边栏推荐
- Add directory navigation to personal blog website articles
- C语言数据类型及typedef下的uint8_t / uint32_t
- Hard core strength! Feiling Ti Sitara am62x series-335x classic continuation
- 內網滲透隧道技術的相關知識
- Secure Code Warrlor学习记录(二)
- Secure Code Warrlor学习记录(四)
- 线性卷积、循环卷积、周期卷积的定义、计算方法及三者之间的关系
- Secure Code Warrlor学习记录(三)
- 計算機408+數據庫【適合考研複試或期末複習】
- Wireless network test based on Feiling NXP i.mx6ull
猜你喜欢
Output PWM square wave with ls1028a development board
vulnhub 靶机 GOLDENEYE: 1
解决问题phpstudy导入数据库失败
2022-7-8 第八小组 顾宇佳 拓展训练
软件工程期末复习思维导图
Qt解决大量重复数据的操作
Many new features of ktor2.0 were thought of a year ago and have been implemented in the project
"Embedded intelligence" constantly empowers medical devices
FPGA skimming p2: multifunctional data processor, calculate the difference between two numbers, use generate For statement simplifies the code, uses sub modules to realize the size comparison of three
After ise14.7 was installed in win10 system, the software flashed back and the driver could not be installed normally
随机推荐
TypeScript 中类型 any,void,unknown,never之间的区别
Depth evaluation of Ruixin micro rk3568 development board
Vulnhub target jangow: 1.0.1
Pearson correlation coefficient and code implementation (C language +matlab)
FPGA - detailed explanation of SPI bus (concept)
FPGA majority voter (including code)
乐山师范程序设计大赛2020-D: 后缀语言【STL】
vulnhub 靶机 GOLDENEYE: 1
Precautions for the selection and conversion of single power supply operational amplifier and dual power supply operational amplifier and their power supply mode
提升开发效率的 Chrome 开发者工具快捷键参考
"Embedded intelligence" constantly empowers medical devices
代码审计之若依系统
乐山师范程序设计大赛2020-G: 最大公约数【思维】
Leetcode:905. 按奇偶排序数组【双指针+三种语言实现】
正则表达式的设计
内网渗透隧道技术的相关知识
FPGA skimming P4: use 8-3 priority encoder to realize 16-4 priority encoder, use 3-8 decoder to realize full subtracter, realize 3-8 decoder, use 3-8 decoder to realize logic function, and use data se
PCL基本操作大全
Bing必应搜索用不了方法
Verilog HDL language summary (full)