On Fri, Sep 19, 2008 at 1:11 AM, David Cournapeau < [EMAIL PROTECTED]> wrote:
> Anne Archibald wrote: > > > > Well, for example, you might ask that all the non-nan elements be in > > order, even if you don't specify where the nan goes. > > > Ah, there are two problems, then: > - sort > - how median use sort. > > For sort, I don't know how sort speed would be influenced by treating > nan. In a way, calling sort with nan inside is a user error (if you take > the POV nan are not comparable), but nan are used for all kind of > purpose, used <- misused. Using nan to flag anything but a numerical error is going to cause problems. It wouldn't be too hard to implement nansorts, they just need a real comparison function so that all the nans end up at on end or the other. I don't know that that would make medians any easier, though. Are the nans part of the data set? A nansearchsorted would probably be needed also. If this functionality is added, the best way might be something like kind='nanquicksort'. Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion