# 3.如何交换数组np.arange(9).reshape(3,3)中的第1行和第2行?
a = np.arange(9).reshape(3,3)
a = a[[1,0,2],:]
print(a)
[[3 4 5]
[0 1 2]
[6 7 8]]
# 3.如何交换数组np.arange(9).reshape(3,3)中的第1行和第2行?
a = np.arange(9).reshape(3,3)
a = a[[1,0,2],:]
print(a)
[[3 4 5]
[0 1 2]
[6 7 8]]
本文详细的介绍了,在Java 中数组的使用,并对其内存存在形式进行了详细的分析。
sizeof和strlen的区别
生成表格np.arange().reshapenp.random.randn()
【第 45 天】二维数组的应用 | 求二维数组每一行的最大值与最小值
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M