Get a value in a numpy array from a index in a variable
I am trying to access a value in a multi dimensional numpy array.
This can be easily done when you know everything, for exemple :
T = numpy.arrange(9).reshape(3, 3)
And it returns 8, which is what I want.
Now, Let's assume [2, 2] is stored in index variable.
How can I do to take the value in T with the index stored in index ?
I would like to do
T[index] but it returns the last row twice (pretty logical but not what I want).