On 19/09/06, Charles R Harris <[EMAIL PROTECTED]> wrote:
>
>
>
> For floats we could use something like:
>
> lessthan(a,b) := a < b || (a == nan && b != nan)
>
> Which would put all the nans at one end and might not add too much overhead.

You could put an any(isnan()) out front and run this slower version
only if there are any NaNs (also, you can't use == for NaNs, you have
to use C isNaN). But I'm starting to see the wisdom in simply throwing
an exception, since sorting is not well-defined with NaNs.

A. M. Archibald

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to