Re: Sorting array

2007-12-01 Thread Robert Kern
Tartifola wrote: > > Hi, > > On Fri, 30 Nov 2007 14:55:08 -0600 > Robert Kern <[EMAIL PROTECTED]> wrote: >> numpy questions are best asked on the numpy-discussion mailing list since >> everyone there automatically knows that you are talking about numpy arrays >> and >> not just misnaming lists.

Re: Sorting array

2007-12-01 Thread Tartifola
Hi, On Fri, 30 Nov 2007 14:55:08 -0600 Robert Kern <[EMAIL PROTECTED]> wrote: > Tartifola wrote: > > > > Hi, > > I'm working with numerical array and I'm a little lost on a particular > > sorting of one of them. In particular I have an array like > > > > a = array([[8,4,1],[2,0,9]]) > > > >

Re: Sorting array

2007-11-30 Thread Robert Kern
Tartifola wrote: > > Hi, > I'm working with numerical array and I'm a little lost on a particular > sorting of one of them. In particular I have an array like > > a = array([[8,4,1],[2,0,9]]) > > and I need to sort it using only the first column as reference but > keeping the lines together so t

Re: Sorting array

2007-11-30 Thread Robert Kern
Chris Hulan wrote: > the list.sort method seems to do exactly what you want? > > Unless your array() method is creating a custom array object with > different sort functionality than list? Presumably he is using numpy arrays. -- Robert Kern "I have come to believe that the whole world is an en

Re: Sorting array

2007-11-30 Thread Chris Hulan
the list.sort method seems to do exactly what you want? Unless your array() method is creating a custom array object with different sort functionality than list? Cheers -- http://mail.python.org/mailman/listinfo/python-list

Sorting array

2007-11-30 Thread Tartifola
Hi, I'm working with numerical array and I'm a little lost on a particular sorting of one of them. In particular I have an array like a = array([[8,4,1],[2,0,9]]) and I need to sort it using only the first column as reference but keeping the lines together so to obtain array([[2, 0, 9],