Re: [Numpy-discussion] Multidimensional Indexing

2015-04-08 Thread Sebastian Berg
On Di, 2015-04-07 at 00:49 +0100, Nicholas Devenish wrote: > With the indexing example from the documentation: > > y = np.arange(35).reshape(5,7) > > Why does selecting an item from explicitly every row work as I’d expect: > >>> y[np.array([0,1,2,3,4]),np.array([0,0,0,0,0])] > array([ 0, 7, 14,

Re: [Numpy-discussion] Multidimensional Indexing

2015-04-08 Thread Chad Fulton
On Mon, Apr 6, 2015 at 4:49 PM, Nicholas Devenish wrote: > With the indexing example from the documentation: > > y = np.arange(35).reshape(5,7) > > Why does selecting an item from explicitly every row work as I’d expect: y[np.array([0,1,2,3,4]),np.array([0,0,0,0,0])] > array([ 0, 7, 14, 21,

Re: [Numpy-discussion] Multidimensional Indexing

2015-04-08 Thread Nikolay Mayorov
xpert, though. Nikolay. > From: misno...@gmail.com > Date: Tue, 7 Apr 2015 00:49:34 +0100 > To: numpy-discussion@scipy.org > Subject: [Numpy-discussion] Multidimensional Indexing > > With the indexing example from the documentation: > > y = np.arange(35).reshape(5,7) > &

[Numpy-discussion] Multidimensional Indexing

2015-04-06 Thread Nicholas Devenish
With the indexing example from the documentation: y = np.arange(35).reshape(5,7) Why does selecting an item from explicitly every row work as I’d expect: >>> y[np.array([0,1,2,3,4]),np.array([0,0,0,0,0])] array([ 0, 7, 14, 21, 28]) But doing so from a full slice (which, I would naively expect t