Strange numpy.argmax behavior on object arrays in numpy 1.0.

Tom Denniston tom.denniston at alum.dartmouth.org
Mon Oct 30 10:32:20 CST 2006


Yes I definately agree about the latter!

On 10/29/06, Charles R Harris <charlesr.harris at gmail.com> wrote:
>
>
>
> On 10/29/06, Tom Denniston <tom.denniston at alum.dartmouth.org> 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=object))
> Out[61]: array([2, 3], dtype=object)
>
> In [62]: argmax(array([2,3], dtype=object))
> Out[62]: 0
>
> See, the sort works fine. I suspect argmax is using the wrong comparison
> function. I was just pointing out that sometimes it is hard to know what is
> going on with objects.
>
>
> Chuck
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20061030/a39e403c/attachment-0001.html 
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


More information about the Numpy-discussion mailing list