Re: [Numpy-discussion] [Bug] important bug in method sum

2008-02-05 Thread Charles R Harris
On Feb 5, 2008 9:27 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > On Feb 5, 2008 11:58 AM, <[EMAIL PROTECTED]> wrote: > > The problem is for an array larger than 256*256 the sum is going crazy. > > > > In [45]: numpy.arange(256*256) > > Out[45]: array([0, 1, 2, ..., 65533, 65534, 655

Re: [Numpy-discussion] [Bug] important bug in method sum

2008-02-05 Thread Keith Goodman
On Feb 5, 2008 11:58 AM, <[EMAIL PROTECTED]> wrote: > The problem is for an array larger than 256*256 the sum is going crazy. > > In [45]: numpy.arange(256*256) > Out[45]: array([0, 1, 2, ..., 65533, 65534, 65535]) > > In [46]: numpy.arange(256*256).sum() > Out[46]: 2147450880 > > In [

Re: [Numpy-discussion] [Bug] important bug in method sum

2008-02-05 Thread humufr
Sorry its not really a bug. I understood why . It's an integer and I'm doing an overflow. Perhaps an error message can be printed or an automatic change (with a warning) can be done. I think that I prefer to loose the type but keep the value correct. N. ___

[Numpy-discussion] [Bug] important bug in method sum

2008-02-05 Thread humufr
Hello, when doing some test I saw a very important bug in numpy (at least on the svn version and 1.0.3 (ubuntu package)). I'm using a svn version of numpy: In [31]: numpy.__version__ Out[31]: '1.0.5.dev4767' The problem is for an array larger than 256*256 the su