Short description:
I have two numpy arrays.
data,data.shapeis a tuple with X entriesindices,indices.shapeis the tuple(X,Y)
indices is basically a list of index arrays.
The arrays along the second dimension specify lists of indices for the corresponding dimension in data.
indices[0,:]is a list of indices for the first dimension ofdata.indices[1,:]is a list of indices for the second dimension ofdata.
I would like to have a combination of all of them, an outer product.
The syntax I would like to use is simply:
data[indices]
EDIT:
Here was a long step-by-step review of all the things I tried, now obsolete I found the solution, it's below.
UPDATE:
I found a solution.
In my answer below, there's an explanation how this indexing works.
You probably want to use Divakar's version though, he shows the np.ix() command which does exactly what is needed in one call.