[单选题]arr = np.array([[1, 2, 3, 4, 5],[4, 5, 6, 7, 8], [7, 8, 9, 10, 11]]) mask = np.array([1,0,1],dtype = np.bool) print('索引结果为:',arr[mask,2]) 上面语句索引结果:( )
竞赛题库
|
2023-10-27 16:23:59
|
21
[单选题]arr = np.array([[1, 2, 3, 4, 5],[4, 5, 6, 7, 8], [7, 8, 9, 10, 11]]) mask = np.array([1,0,1],dtype = np.bool) print('索引结果为:',arr[mask,2]) 上面语句索引结果:( )

A.索引结果为: [3 4 9]
B.索引结果为: [1  3]
C.索引结果为: [1  1]
D.索引结果为: [3  9]
查看答案

西南科技大学

大数据分析原理与实践

您可能感兴趣的试题
TOP