Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Bill Baxter
On 5/17/07, David M. Cooke <[EMAIL PROTECTED]> wrote: On Wed, May 16, 2007 at 09:03:43PM -0400, Anne Archibald wrote: > Hi, > > Numpy has a max() function. It takes an array, and possibly some extra > arguments (axis and default). Unfortunately, this means that > > >>> numpy.max(-1.3,2,7) > -1.3

Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Charles R Harris
On 5/16/07, David M. Cooke <[EMAIL PROTECTED]> wrote: On Wed, May 16, 2007 at 09:03:43PM -0400, Anne Archibald wrote: > Hi, > > Numpy has a max() function. It takes an array, and possibly some extra > arguments (axis and default). Unfortunately, this means that > > >>> numpy.max(-1.3,2,7) > -1.3

Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread David M. Cooke
On Wed, May 16, 2007 at 09:03:43PM -0400, Anne Archibald wrote: > Hi, > > Numpy has a max() function. It takes an array, and possibly some extra > arguments (axis and default). Unfortunately, this means that > > >>> numpy.max(-1.3,2,7) > -1.3 > > This can lead to surprising bugs in code that eit

Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Robert Kern
Anne Archibald wrote: > On 16/05/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: >> On Wed, 16 May 2007, Anne Archibald apparently wrote: >> numpy.max(-1.3,2,7) ^ typo >>> -1.3 >> Is that new behavior? >> I get a TypeError on the last argument. >> (As ex

Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Anne Archibald
On 16/05/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Wed, 16 May 2007, Anne Archibald apparently wrote: > numpy.max(-1.3,2,7) > > -1.3 > > Is that new behavior? > I get a TypeError on the last argument. > (As expected.) For which version of numpy? In [2]: numpy.max(-1.3,2.7) Out[2]: -1.3

Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Keith Goodman
On 5/16/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > Numpy has a max() function. It takes an array, and possibly some extra > arguments (axis and default). Unfortunately, this means that > > >>> numpy.max(-1.3,2,7) > -1.3 > > This can lead to surprising bugs in code that either explicitly > expe

Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Alan G Isaac
On Wed, 16 May 2007, Anne Archibald apparently wrote: numpy.max(-1.3,2,7) > -1.3 Is that new behavior? I get a TypeError on the last argument. (As expected.) Cheers, Alan Isaac ___ Numpy-discussion mailing list Numpy-discussion@scipy.org htt

Re: [Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Bill Baxter
On 5/17/07, Anne Archibald <[EMAIL PROTECTED]> wrote: Hi, Numpy has a max() function. It takes an array, and possibly some extra arguments (axis and default). Unfortunately, this means that >>> numpy.max(-1.3,2,7) -1.3 This can lead to surprising bugs in code that either explicitly expects it

[Numpy-discussion] Unfortunate user experience with max()

2007-05-16 Thread Anne Archibald
Hi, Numpy has a max() function. It takes an array, and possibly some extra arguments (axis and default). Unfortunately, this means that >>> numpy.max(-1.3,2,7) -1.3 This can lead to surprising bugs in code that either explicitly expects it to behave like python's max() or implicitly expects that

[Numpy-discussion] Heads up on gcc-4.2 and -fstrict-overflow

2007-05-16 Thread Charles R Harris
Hi All, The newest released version of gcc implements the flag -fstrict-overflow, which is on by default. In C this means that signed integers are assumed to not overflow, as by the strict C standard only unsigned integers use modular arithmetic and wrap. This may affect numpy because currently s