Re: [Numpy-discussion] Reordering 2 dimensional array by column

2012-08-02 Thread Nicole Stoffels
Thanks eat! It helps and it's so easy! :) On 02.08.2012 14:59, eat wrote: Hi, On Thu, Aug 2, 2012 at 3:43 PM, Nicole Stoffels mailto:nicole.stoff...@forwind.de>> wrote: Dear all, I have a two-dimensional array: a = array([[1,2,3],[0,2,1],[5,7,8]]) I want to reorder it by t

Re: [Numpy-discussion] Reordering 2 dimensional array by column

2012-08-02 Thread eat
Hi, On Thu, Aug 2, 2012 at 3:43 PM, Nicole Stoffels wrote: > Dear all, > > I have a two-dimensional array: > > a = array([[1,2,3],[0,2,1],[5,7,8]]) > > I want to reorder it by the last column in descending order, so that I get: > > b =array([[5, 7, 8],[1, 2, 3],[0, 2, 1]]) > Perhaps along the lin

[Numpy-discussion] Reordering 2 dimensional array by column

2012-08-02 Thread Nicole Stoffels
Dear all, I have a two-dimensional array: a = array([[1,2,3],[0,2,1],[5,7,8]]) I want to reorder it by the last column in descending order, so that I get: b =array([[5, 7, 8],[1, 2, 3],[0, 2, 1]]) What I did first is the following, which reorders the array in ascending order (I found that met