Re: [Numpy-discussion] strange behavior of numpy.unique

2012-11-07 Thread Charles R Harris
On Tue, Nov 6, 2012 at 7:52 PM, Warren Weckesser wrote: > > > On Tue, Nov 6, 2012 at 8:27 PM, Phillip Feldman < > phillip.m.feld...@gmail.com> wrote: > >> numpy.unique behaves as I would expect for small inputs like the >> following: >> >> In [12]: x= [0, 0, 1, 0, 1, 2, 0, 1, 2, 3] >> >> In [13]:

Re: [Numpy-discussion] strange behavior of numpy.unique

2012-11-07 Thread Warren Weckesser
On Wed, Nov 7, 2012 at 11:24 AM, wrote: > On Tue, Nov 6, 2012 at 9:52 PM, Warren Weckesser > wrote: > > > > > > On Tue, Nov 6, 2012 at 8:27 PM, Phillip Feldman > > wrote: > >> > >> numpy.unique behaves as I would expect for small inputs like the > >> following: > >> > >> In [12]: x= [0, 0, 1, 0

Re: [Numpy-discussion] strange behavior of numpy.unique

2012-11-07 Thread josef . pktd
On Tue, Nov 6, 2012 at 9:52 PM, Warren Weckesser wrote: > > > On Tue, Nov 6, 2012 at 8:27 PM, Phillip Feldman > wrote: >> >> numpy.unique behaves as I would expect for small inputs like the >> following: >> >> In [12]: x= [0, 0, 1, 0, 1, 2, 0, 1, 2, 3] >> >> In [13]: unique(x, return_index=True)

Re: [Numpy-discussion] strange behavior of numpy.unique

2012-11-06 Thread Warren Weckesser
On Tue, Nov 6, 2012 at 8:27 PM, Phillip Feldman wrote: > numpy.unique behaves as I would expect for small inputs like the following: > > In [12]: x= [0, 0, 1, 0, 1, 2, 0, 1, 2, 3] > > In [13]: unique(x, return_index=True) > Out[13]: (array([0, 1, 2, 3]), array([0, 2, 5, 9], dtype=int64)) > > But,

[Numpy-discussion] strange behavior of numpy.unique

2012-11-06 Thread Phillip Feldman
numpy.unique behaves as I would expect for small inputs like the following: In [12]: x= [0, 0, 1, 0, 1, 2, 0, 1, 2, 3] In [13]: unique(x, return_index=True) Out[13]: (array([0, 1, 2, 3]), array([0, 2, 5, 9], dtype=int64)) But, when I give it something larger, the return index values do not alway