Reputation: 2067
Let's assume I have following numpy arrays:
idx = [1,2]
A = [[1,2,3],
[4,5,6],
[7,8,9]]
I want to get A[idx[0],idx[1]]
A[idx]
gets a slice. And I don't want to use A[idx[0],idx[1]]
for clarity reasons
Upvotes: 0
Views: 46