Re: [Numpy-discussion] sort descending with NaNs

2011-01-27 Thread Charles R Harris
On Thu, Jan 27, 2011 at 10:10 AM, Charles R Harris < charlesr.har...@gmail.com> wrote: > > > On Thu, Jan 27, 2011 at 9:50 AM, Fabrizio Pollastri > wrote: > >> Hello, >> >> when one has to find a given number of highest values in an array >> containing >> NaNs, the sort function (always ascending)

Re: [Numpy-discussion] sort descending with NaNs

2011-01-27 Thread Charles R Harris
On Thu, Jan 27, 2011 at 9:50 AM, Fabrizio Pollastri wrote: > Hello, > > when one has to find a given number of highest values in an array > containing > NaNs, the sort function (always ascending) is uncomfortable. > > Since numpy >= 1.4.0 NaNs are sorted to the end, so the searched values are > ju

[Numpy-discussion] sort descending with NaNs

2011-01-27 Thread Fabrizio Pollastri
Hello, when one has to find a given number of highest values in an array containing NaNs, the sort function (always ascending) is uncomfortable. Since numpy >= 1.4.0 NaNs are sorted to the end, so the searched values are just before the first NaN in a unpredictable position and one has to do anot