Indexing a numpy array with a list of tuples

https://stackoverflow.com/questions/28491230/indexing-a-numpy-array-with-a-list-of-tuples

X[tuple(zip(*idx1))]

 

 

X[idx2[:,0], idx2[:,1]]
posted @ 2020-03-05 10:25  imoon22  阅读(86)  评论(0编辑  收藏  举报