Re: [Numpy-discussion] Array mapping question

2010-03-16 Thread Jorge Scandaliaris
gmail.com> writes: > If I remember correctly it was unique1d in numpy 1.3 that had the > return_inverse options. > > Check the functions in arraysetops for numpy 1.3. > unique1d is in my help file for numpy 1.2 (which was the fastest for > me to look up) > You're right, again. unique1d is in

Re: [Numpy-discussion] Array mapping question

2010-03-16 Thread josef . pktd
On Tue, Mar 16, 2010 at 9:33 AM, Jorge Scandaliaris wrote: >   gmail.com> writes: > >> >> If I understand correctly, then you want return_inverse  (the original >> array recoded to using integers 0...len(ctab)-1 >> > >> Josef > > Right, thanks! I didn't see this cause I use numpy 1.3, where this i

Re: [Numpy-discussion] Array mapping question

2010-03-16 Thread Jorge Scandaliaris
gmail.com> writes: > > If I understand correctly, then you want return_inverse (the original > array recoded to using integers 0...len(ctab)-1 > > Josef Right, thanks! I didn't see this cause I use numpy 1.3, where this is not available. Jorge

Re: [Numpy-discussion] Array mapping question

2010-03-16 Thread josef . pktd
On Tue, Mar 16, 2010 at 8:00 AM, Jorge Scandaliaris wrote: > Hi, > I have a 1D array containing indexes to specific measurements. As this array > is > a slice of a bigger one, the indexes don't necessarily start at 0 nor they are > sequential. For example, I can have an array A where > > In [34]:

[Numpy-discussion] Array mapping question

2010-03-16 Thread Jorge Scandaliaris
Hi, I have a 1D array containing indexes to specific measurements. As this array is a slice of a bigger one, the indexes don't necessarily start at 0 nor they are sequential. For example, I can have an array A where In [34]: A.shape Out[34]: (4764,) In [35]: ctab = np.unique(A) In [36]: ctab Out[3