[Numpy-discussion] n-dimensional array indexing question
Sat Nov 8 16:35:20 CST 2008
I have array A, A.ndim = n, and 1-dimensional array B of length n.
How can I get element of A with coords B,...,B[n-1]?
i.e. A[B, B, ..., B[n-1])
A, B, n are not known till execution time, and can have unpredictable
lengths (still n is usually small, no more than 4-5).
I have tried via ix_ but haven't succeeded yet.
Thx in advance, D.
More information about the Numpy-discussion