rows=np.array([[0,0],[3,3]]) # 列 cols=np.array([[0,2],[0,2]]) # 通过数组进行一一对应的slice # 获取四个角落的元素 x[rows,cols]
確定! 回上一頁