numpy的索引
#numpy的索引
import numpy as np
d = np.arange(100)
d2=d.reshape((20,5))
print(d2)
“”"
取第一行第一列的数据
“”"
print(d2[0,0])
#取前2行的数组
#print(d2[:2,])
#前3行前3列
print(d2[:3,:3])
#第三行第5列
print(d2[2,4])
#numpy的索引
import numpy as np
d = np.arange(100)
d2=d.reshape((20,5))
print(d2)
“”"
取第一行第一列的数据
“”"
print(d2[0,0])
#取前2行的数组
#print(d2[:2,])
#前3行前3列
print(d2[:3,:3])
#第三行第5列
print(d2[2,4])