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:50 AM, Matthew Brett wrote: > Hi, > > On Sat, Mar 30, 2013 at 9:37 PM, wrote: >> On Sun, Mar 31, 2013 at 12:04 AM, Matthew Brett >> wrote: >>> Hi, >>> >>> On Sat, Mar 30, 2013 at 7:02 PM, wrote: On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett wrote:

Re: [Numpy-discussion] Indexing bug

2013-03-30 Thread Ivan Oseledets
Message: 2 Date: Sat, 30 Mar 2013 11:13:35 -0700 From: Jaime Fern?ndez del R?o Subject: Re: [Numpy-discussion] Indexing bug? To: Discussion of Numerical Python Message-ID: Content-Type: text/plain; charset="iso-8859-1" On Sat, Mar 30, 2013 at 11:01 AM, Ivan Oseledets wrote: > I am usin

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 9:37 PM, wrote: > On Sun, Mar 31, 2013 at 12:04 AM, Matthew Brett > wrote: >> Hi, >> >> On Sat, Mar 30, 2013 at 7:02 PM, wrote: >>> On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett >>> wrote: Hi, On Sat, Mar 30, 2013 at 7:50 PM, wrote: > On Sa

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 wrote: > Hi, > > On Sat, Mar 30, 2013 at 7:02 PM, wrote: >> On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett >> wrote: >>> Hi, >>> >>> On Sat, Mar 30, 2013 at 7:50 PM, wrote: On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle 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 9:05 PM, wrote: > On Sat, Mar 30, 2013 at 11:43 PM, Matthew Brett > wrote: >> Hi, >> >> On Sat, Mar 30, 2013 at 7:02 PM, wrote: >>> On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett >>> wrote: Hi, On Sat, Mar 30, 2013 at 7:50 PM, wrote: > On Sa

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 wrote: > Hi, > > On Sat, Mar 30, 2013 at 7:02 PM, wrote: >> On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett >> wrote: >>> Hi, >>> >>> On Sat, Mar 30, 2013 at 7:50 PM, wrote: On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle 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 7:02 PM, wrote: > On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett > wrote: >> Hi, >> >> On Sat, Mar 30, 2013 at 7:50 PM, wrote: >>> On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle >>> wrote: On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett 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 7:02 PM, wrote: > On Sat, Mar 30, 2013 at 8:29 PM, Matthew Brett > wrote: >> Hi, >> >> On Sat, Mar 30, 2013 at 7:50 PM, wrote: >>> On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle >>> wrote: On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett 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 wrote: > Hi, > > On Sat, Mar 30, 2013 at 7:50 PM, wrote: >> On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle >> wrote: >>> On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett >>> wrote: On Sat, Mar 30, 2013 at 2:20 PM, wrote: > On S

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, wrote: > On Sat, Mar 30, 2013 at 7:31 PM, Bradley M. Froehle > wrote: >> On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett >> wrote: >>> >>> On Sat, Mar 30, 2013 at 2:20 PM, wrote: >>> > On Sat, Mar 30, 2013 at 4:57 PM, wrote: >>> >> On Sat, Mar 30, 2013 a

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 wrote: > On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett > wrote: >> >> On Sat, Mar 30, 2013 at 2:20 PM, wrote: >> > On Sat, Mar 30, 2013 at 4:57 PM, wrote: >> >> On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett >> >> wrote: >> >>> On Sat, Mar

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 wrote: > On Sat, Mar 30, 2013 at 3:21 PM, Matthew Brett > wrote: >> >> On Sat, Mar 30, 2013 at 2:20 PM, wrote: >> > On Sat, Mar 30, 2013 at 4:57 PM, wrote: >> >> On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett >> >> wrote: >> >>> On Sat

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 wrote: > On Sat, Mar 30, 2013 at 2:20 PM, wrote: > > On Sat, Mar 30, 2013 at 4:57 PM, wrote: > >> On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett > wrote: > >>> On Sat, Mar 30, 2013 at 4:14 AM, wrote: > On Fri, Mar 29, 2013 at 10:08 PM, Mat

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 > 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 i

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, wrote: > On Sat, Mar 30, 2013 at 4:57 PM, wrote: >> On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett >> wrote: >>> Hi, >>> >>> On Sat, Mar 30, 2013 at 4:14 AM, wrote: On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett wrote: > > Hi, >

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, wrote: > On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett > wrote: >> Hi, >> >> On Sat, Mar 30, 2013 at 4:14 AM, wrote: >>> On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett >>> wrote: Hi, We were teaching today, and found ourselves gett

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, wrote: > On Sat, Mar 30, 2013 at 3:51 PM, Matthew Brett > wrote: >> Hi, >> >> On Sat, Mar 30, 2013 at 4:14 AM, wrote: >>> On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett >>> wrote: Hi, We were teaching today, and found ourselves getting v

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 wrote: > Hi, > > On Sat, Mar 30, 2013 at 4:14 AM, wrote: >> On Fri, Mar 29, 2013 at 10:08 PM, Matthew Brett >> wrote: >>> >>> Hi, >>> >>> We were teaching today, and found ourselves getting very confused >>> about ravel and shape in numpy. >>> >>>

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, wrote: > On Fri, Mar 29, 2013 at 10:08 PM, 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

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 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 separate idea

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):

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 wrote: > 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) >

[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] 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, wrote: > On Fri, Mar 29, 2013 at 10:08 PM, 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 un

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 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): r