I have a list of tuples: [(0,0), (1,1), (2,2), (3,3), (4,4)]
And I have my 2d numpy array:
array([[8, 6, 5, 9, 3],
[7, 9, 7, 9, 1],
[2, 1, 8, 8, 6],
[7, 1, 5, 1, 3],
[6, 7, 1, 1, 5]])
How can I get the values from the 2d array located by using the positions from the list with numpy?
I should get the diagonal: [8,9,8,1,5]
([0,1,2,3],[0,1,2,3])