Say I have an array
A = array([[1,2,3],
[4,5,6],
[7,8,9]])
Index array is
B = array([[1], # want [0, 1] element of A
[0], # want [1, 0], element of A
[1]]) # want [2, 1] elemtn of A
By this index array B, I want a 3-by-1 array, whose elements are taken from array A, that is
C = array([[2],
[4],
[8]])
I tried numpy.choose, but I failed to that.