>>> image = np.arange(20).reshape((4, 5))
>>> image
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14],
[15, 16, 17, 18, 19]])
>>> idx = [[2, 1], [2, 3], [3, 4]]
How do I get the values from the image array which coordinate is specified in idx? From the above code, I want to get the values 11 (image[2, 1]), 13 (image[2, 3]), and 19 (image[3, 4]). Thank you.
image [2,3]. I cannot edit, as it takes less than six chars.