Re: [Numpy-discussion] Is this the optimal way to take index along a single axis?

2011-03-10 Thread Jonathan Taylor
I see. Should functionality like this be included in numpy? Jon. On Tue, Mar 8, 2011 at 3:39 PM, josef.p...@gmail.com wrote: On Tue, Mar 8, 2011 at 3:03 PM, Jonathan Taylor jonathan.tay...@utoronto.ca wrote: I am wanting to use an array b to index into an array x with dimension bigger by

Re: [Numpy-discussion] Is this the optimal way to take index along a single axis?

2011-03-08 Thread josef . pktd
On Tue, Mar 8, 2011 at 3:03 PM, Jonathan Taylor jonathan.tay...@utoronto.ca wrote: I am wanting to use an array b to index into an array x with dimension bigger by 1 where the element of b indicates what value to extract along a certain direction.  For example, b = x.argmin(axis=1). Perhaps I