[SciPy-User] sorting an array
Neil Crighton
neilcrighton at gmail.com
Sun Aug 2 04:43:49 EDT 2009
Martin <mdekauwe <at> gmail.com> writes:
> Hi all,
>
> Thanks for the replies...perhaps if I explained the context it might
> help (or it might not!). Basically it is an image processing problem
> so the array is rows, columns. So I want to sort the array such that
> ...
> Neil your solution results in column 4 changing some of the ordering
> from what I can see (the zero in the fourth column).
>
I think I see now - you want the values in the third and fourth columns to be
unchanged after sorting? Then, yeah, I think Emmanuelle's version is the
way to go.
I was confused by the first sentence in your original post. To me, 'sort an
array by the first column' means sort every column using the ordering of
values in the first column.
Neil
More information about the SciPy-User
mailing list