Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, We were teaching today, and found ourselves getting very confused about ravel and shape in numpy. Summary -- There are two separate ideas needed to understand ordering in ravel and reshape:

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Sat, Mar 30, 2013 at 7:14 AM, josef.p...@gmail.com wrote: On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, We were teaching today, and found ourselves getting very confused about ravel and shape in numpy. Summary -- There are two

[Numpy-discussion] Indexing bug?

2013-03-30 Thread Ivan Oseledets
I am using numpy 1.6.1, and encountered a wierd fancy indexing bug: import numpy as np c = np.random.randn(10,200,10); In [29]: print c[[0,1],:200,:2].shape (2, 200, 2) In [30]: print c[[0,1],:200,[0,1]].shape (2, 200) It means, that here fancy indexing is not working right for a 3d array. Is

Re: [Numpy-discussion] Indexing bug?

2013-03-30 Thread Jaime Fernández del Río
On Sat, Mar 30, 2013 at 11:01 AM, Ivan Oseledets ivan.oseled...@gmail.comwrote: I am using numpy 1.6.1, and encountered a wierd fancy indexing bug: import numpy as np c = np.random.randn(10,200,10); In [29]: print c[[0,1],:200,:2].shape (2, 200, 2) In [30]: print

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Sebastian Berg
On Fri, 2013-03-29 at 19:08 -0700, Matthew Brett wrote: Hi, We were teaching today, and found ourselves getting very confused about ravel and shape in numpy. Summary -- There are two separate ideas needed to understand ordering in ravel and reshape: Idea 1): ravel /

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 11:55 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Fri, 2013-03-29 at 19:08 -0700, Matthew Brett wrote: Hi, We were teaching today, and found ourselves getting very confused about ravel and shape in numpy. Summary -- There are two

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 4:14 AM, josef.p...@gmail.com wrote: On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, We were teaching today, and found ourselves getting very confused about ravel and shape in numpy. Summary -- There are two

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 4:14 AM, josef.p...@gmail.com wrote: On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, We were teaching today, and found ourselves getting very

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Sat, Mar 30, 2013 at 4:57 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 4:14 AM, josef.p...@gmail.com wrote: On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett matthew.br...@gmail.com wrote:

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 1:57 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 4:14 AM, josef.p...@gmail.com wrote: On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett matthew.br...@gmail.com wrote:

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 2:20 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 4:57 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 4:14 AM, josef.p...@gmail.com wrote: On Fri, Mar 29,

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Sebastian Berg
On Sat, 2013-03-30 at 12:45 -0700, Matthew Brett wrote: Hi, On Sat, Mar 30, 2013 at 11:55 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Fri, 2013-03-29 at 19:08 -0700, Matthew Brett wrote: Hi, We were teaching today, and found ourselves getting very confused about ravel

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Bradley M. Froehle
On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett matthew.br...@gmail.comwrote: On Sat, Mar 30, 2013 at 2:20 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 4:57 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett matthew.br...@gmail.com wrote: On Sat,

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 4:31 PM, Bradley M. Froehle brad.froe...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett matthew.br...@gmail.com wrote: On Sat, Mar 30, 2013 at 2:20 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 4:57 PM, josef.p...@gmail.com wrote:

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle brad.froe...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett matthew.br...@gmail.com wrote: On Sat, Mar 30, 2013 at 2:20 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 4:57 PM, josef.p...@gmail.com wrote: On

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 7:50 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle brad.froe...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett matthew.br...@gmail.com wrote: On Sat, Mar 30, 2013 at 2:20 PM, josef.p...@gmail.com wrote:

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 7:50 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle brad.froe...@gmail.com wrote: On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 7:02 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 7:50 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle brad.froe...@gmail.com

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread Matthew Brett
Hi, On Sat, Mar 30, 2013 at 7:02 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 7:50 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle brad.froe...@gmail.com

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Sat, Mar 30, 2013 at 11:43 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 7:02 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 7:50 PM, josef.p...@gmail.com wrote:

Re: [Numpy-discussion] Raveling, reshape order keyword unnecessarily confuses index and memory ordering

2013-03-30 Thread josef . pktd
On Sun, Mar 31, 2013 at 12:04 AM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 7:02 PM, josef.p...@gmail.com wrote: On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Mar 30, 2013 at 7:50 PM, josef.p...@gmail.com wrote: