On Thu, May 6, 2010 at 11:25 AM, T J wrote:
> Hi,
>
> Is there a way to sort the columns in an array? I need to sort it so
> that I can easily go through and keep only the unique columns.
> ndarray.sort(axis=1) doesn't do what I want as it destroys the
> relative ordering between the various col
On Thu, May 6, 2010 at 4:45 PM, T J wrote:
> On Thu, May 6, 2010 at 10:36 AM, wrote:
>>
>> there is a thread last august on unique rows which might be useful,
>> and a thread in Dec 2008 for sorting rows
>>
>> something like
>>
>> np.unique1d(c.view([('',c.dtype)]*c.shape[1])).view(c.dtype).resh
On Thu, May 6, 2010 at 10:36 AM, wrote:
>
> there is a thread last august on unique rows which might be useful,
> and a thread in Dec 2008 for sorting rows
>
> something like
>
> np.unique1d(c.view([('',c.dtype)]*c.shape[1])).view(c.dtype).reshape(-1,c.shape[1])
>
> maybe it's np.unique with nump
On Thu, May 6, 2010 at 10:34 AM, Keith Goodman wrote:
> On Thu, May 6, 2010 at 10:25 AM, T J wrote:
>> Hi,
>>
>> Is there a way to sort the columns in an array? I need to sort it so
>> that I can easily go through and keep only the unique columns.
>> ndarray.sort(axis=1) doesn't do what I want a
On Thu, May 6, 2010 at 1:25 PM, T J wrote:
> Hi,
>
> Is there a way to sort the columns in an array? I need to sort it so
> that I can easily go through and keep only the unique columns.
> ndarray.sort(axis=1) doesn't do what I want as it destroys the
> relative ordering between the various colum
On Thu, May 6, 2010 at 10:25 AM, T J wrote:
> Hi,
>
> Is there a way to sort the columns in an array? I need to sort it so
> that I can easily go through and keep only the unique columns.
> ndarray.sort(axis=1) doesn't do what I want as it destroys the
> relative ordering between the various colu
Hi,
Is there a way to sort the columns in an array? I need to sort it so
that I can easily go through and keep only the unique columns.
ndarray.sort(axis=1) doesn't do what I want as it destroys the
relative ordering between the various columns. For example, I would
like:
[[2,1,3],
[3,5,1],
[0