Re: [Numpy-discussion] Strange numpy.argmax behavior on object arrays in numpy 1.0.

2006-10-30 Thread Travis Oliphant
Tom Denniston wrote: > I recently upgraded to numpy 1.0 from 1.0b5. I noticed that > numpy.argmax behavior is very strange on object arrays. See below: > > (Pdb) numpy.__version__ > '1.0' > (Pdb) numpy.argmax(numpy.array([2, 3], dtype=object)) > 0 > (Pdb) numpy.argmax(numpy.array([2, 3], dtyp

Re: [Numpy-discussion] Strange numpy.argmax behavior on object arrays in numpy 1.0.

2006-10-30 Thread Tom Denniston
Yes I definately agree about the latter! On 10/29/06, Charles R Harris <[EMAIL PROTECTED]> wrote: On 10/29/06, Tom Denniston < [EMAIL PROTECTED]> wrote: Oh.  My mistake. I thought I had an array of 2 objects which were ints.  I actually had an array of one list of 2 ints.  It works properly if I

Re: [Numpy-discussion] Strange numpy.argmax behavior on object arrays in numpy 1.0.

2006-10-29 Thread Charles R Harris
On 10/29/06, Tom Denniston <[EMAIL PROTECTED]> wrote: Oh.  My mistake. I thought I had an array of 2 objects which were ints.  I actually had an array of one list of 2 ints.  It works properly if I construct the array properly.I think there is actually a bug here: In [61]: sort(array([3,2], dtype=o

Re: [Numpy-discussion] Strange numpy.argmax behavior on object arrays in numpy 1.0.

2006-10-29 Thread Tom Denniston
Oh.  My mistake. I thought I had an array of 2 objects which were ints.  I actually had an array of one list of 2 ints.  It works properly if I construct the array properly.   In [14]: a = numpy.empty((2), dtype=object) In [15]: a[0:]=[2,3] In [16]: aOut[16]: array([2, 3], dtype=object) In [17]: a

Re: [Numpy-discussion] Strange numpy.argmax behavior on object arrays in numpy 1.0.

2006-10-29 Thread Charles R Harris
On 10/29/06, Tom Denniston <[EMAIL PROTECTED]> wrote: I recently upgraded to numpy 1.0 from 1.0b5.   I noticed that numpy.argmax behavior is very strange on object arrays.  See below:   (Pdb) numpy.__version__'1.0' (Pdb) numpy.argmax(numpy.array([2, 3], dtype=object))0(Pdb) numpy.argmax(numpy.array

[Numpy-discussion] Strange numpy.argmax behavior on object arrays in numpy 1.0.

2006-10-29 Thread Tom Denniston
I recently upgraded to numpy 1.0 from 1.0b5.   I noticed that numpy.argmax behavior is very strange on object arrays.  See below:   (Pdb) numpy.__version__'1.0' (Pdb) numpy.argmax(numpy.array([2, 3], dtype=object))0(Pdb) numpy.argmax(numpy.array([2, 3], dtype=int))1 (Pdb) numpy.argmax(numpy.array([