Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread David Cournapeau
Ruben Salvador wrote: > Anyway, this 'deepcopy' really surprised me. I have now looked for it > and I think I get an idea of it, though I wouldn't expect this > difference in behavior to happen. From "my logical" point of view a > copy is a copy, and if I find a method called copy() I can only expe

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread Christopher Barker
Ruben Salvador wrote: > Anyway, this 'deepcopy' really surprised me. I have now looked for it > and I think I get an idea of it, though I wouldn't expect this > difference in behavior to happen. From "my logical" point of view a copy > is a copy, and if I find a method called copy() I can only e

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread Ruben Salvador
Well, thanks everybody for such a quick help!! I just couldn't imagine what could arise this difference. 1e-15 is enough precision for what I will be doing, but was just curious. Anyway, this 'deepcopy' really surprised me. I have now looked for it and I think I get an idea of it, though I wouldn

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread John Gleeson
On 2009-04-20, at 10:04 AM, David Cournapeau wrote: > > Yes, it is legitimate and healthy to worry about the difference - but > the surprising thing really is the list behavior when you are used to > numerical computation :) And I maintain that the algorithms are not > the same in both operations

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread josef . pktd
On Mon, Apr 20, 2009 at 1:47 PM, Matthieu Brucher < matthieu.bruc...@gmail.com> wrote: > > I understand the numerical mathematics behind this very well but my > > point is that his two algorithms appear to be identical (same > > operations, same order), he simply uses lists in one and arrays in th

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread Matthieu Brucher
> I understand the numerical mathematics behind this very well but my > point is that his two algorithms appear to be identical (same > operations, same order), he simply uses lists in one and arrays in the > other. It's not like he used vectorization or other array-related > operations - he uses f

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread josef . pktd
On Mon, Apr 20, 2009 at 12:04 PM, David Cournapeau wrote: > On Tue, Apr 21, 2009 at 12:49 AM, Rob Clewley > wrote: > > On Mon, Apr 20, 2009 at 10:48 AM, David Cournapeau > > wrote: > >> Rob Clewley wrote: > >>> David, > >>> > >>> I'm confused about your reply. I don't think Ruben was only asking

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread David Cournapeau
On Tue, Apr 21, 2009 at 12:49 AM, Rob Clewley wrote: > On Mon, Apr 20, 2009 at 10:48 AM, David Cournapeau > wrote: >> Rob Clewley wrote: >>> David, >>> >>> I'm confused about your reply. I don't think Ruben was only asking why >>> you'd ever get non-zero error after the forward and inverse transf

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread Charles R Harris
On Mon, Apr 20, 2009 at 9:49 AM, Rob Clewley wrote: > On Mon, Apr 20, 2009 at 10:48 AM, David Cournapeau > wrote: > > Rob Clewley wrote: > >> David, > >> > >> I'm confused about your reply. I don't think Ruben was only asking why > >> you'd ever get non-zero error after the forward and inverse t

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread Rob Clewley
On Mon, Apr 20, 2009 at 10:48 AM, David Cournapeau wrote: > Rob Clewley wrote: >> David, >> >> I'm confused about your reply. I don't think Ruben was only asking why >> you'd ever get non-zero error after the forward and inverse transform, >> but why his implementation using lists gives zero error

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread David Cournapeau
Rob Clewley wrote: > David, > > I'm confused about your reply. I don't think Ruben was only asking why > you'd ever get non-zero error after the forward and inverse transform, > but why his implementation using lists gives zero error but using > arrays he gets something of order 1e-15. > That's

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread Rob Clewley
David, I'm confused about your reply. I don't think Ruben was only asking why you'd ever get non-zero error after the forward and inverse transform, but why his implementation using lists gives zero error but using arrays he gets something of order 1e-15. On Mon, Apr 20, 2009 at 9:47 AM, David Co

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread David Cournapeau
David Cournapeau wrote: > Hi Ruben, > > Ruben Salvador wrote: > >> Hi everybody! >> >> First of all I should say I am a newbie with Python/Scipy. Have been >> searching a little bit (google and lists) and haven't found a helpful >> answer...so I'm posting. >> >> I'm using Scipy/Numpy to do image

Re: [Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread David Cournapeau
Hi Ruben, Ruben Salvador wrote: > Hi everybody! > > First of all I should say I am a newbie with Python/Scipy. Have been > searching a little bit (google and lists) and haven't found a helpful > answer...so I'm posting. > > I'm using Scipy/Numpy to do image wavelet transforms via the lifting > sch

[Numpy-discussion] Numpy float precision vs Python list float issue

2009-04-20 Thread Ruben Salvador
Hi everybody! First of all I should say I am a newbie with Python/Scipy. Have been searching a little bit (google and lists) and haven't found a helpful answer...so I'm posting. I'm using Scipy/Numpy to do image wavelet transforms via the lifting scheme. I grabbed some code implementing the trans