Re: [Numpy-discussion] Getting 3-D array values from a 2-D array of indexes

2007-01-09 Thread Robert Kern
Jordan Dawe wrote: > I have a 3D array A of shape (nz, ny, nx) and a 2D array B of shape (ny, > nx) that contains integer indexes. I want to generate a 2D array C of > shape (ny, nx) composed of the values of A at the z-indexes specified in > B. Is there an easy way to do this? An alternative

Re: [Numpy-discussion] Getting 3-D array values from a 2-D array of indexes

2007-01-09 Thread Pau Gargallo
On 1/9/07, Jordan Dawe <[EMAIL PROTECTED]> wrote: > I have a 3D array A of shape (nz, ny, nx) and a 2D array B of shape (ny, > nx) that contains integer indexes. I want to generate a 2D array C of > shape (ny, nx) composed of the values of A at the z-indexes specified in > B. Is there an easy way

[Numpy-discussion] Getting 3-D array values from a 2-D array of indexes

2007-01-08 Thread Jordan Dawe
I have a 3D array A of shape (nz, ny, nx) and a 2D array B of shape (ny, nx) that contains integer indexes. I want to generate a 2D array C of shape (ny, nx) composed of the values of A at the z-indexes specified in B. Is there an easy way to do this? Jordan __