This seems totally simple. In a way it's as if I just need to get rid of some square brackets. I want to use an array to be the indices of a multidimensional array. I must be a total dummy. Here's my minimal example:
import numpy as np
## I know this is a dumb way to initialize.
state = np.array([[[1,2,3],[4,5,6],[7,8,9]],[[10,11,12],[13,14,15],[16,17,18]]])
print('state\n',state)
a = np.array([0,0,0])
print('a',a)
## I want to use a as the indices of state a la:
print('state[a]\n',state[a])
## If I could just get rid of the brackets I'd be fine:
print('state[0,0,0]\n',state[0,0,0])
## This gets me what I want, but it is UGLY in non-minimal case:
print('state[a[0],a[1],a[2]]\n',state[a[0],a[1],a[2]])
Thanks!