Author: Matti Picus <[email protected]>
Branch: ndarray-sort
Changeset: r67264:bde7f67cd9db
Date: 2013-10-09 22:58 +0300
http://bitbucket.org/pypy/pypy/changeset/bde7f67cd9db/

Log:    fix sorting nan for complex

diff --git a/pypy/module/micronumpy/arrayimpl/sort.py 
b/pypy/module/micronumpy/arrayimpl/sort.py
--- a/pypy/module/micronumpy/arrayimpl/sort.py
+++ b/pypy/module/micronumpy/arrayimpl/sort.py
@@ -253,7 +253,12 @@
     else:
         def arg_lt(a, b):
             for i in range(count):
-                if a[i] < b[i] or b != b and a == a:
+                if b[i] != b[i] and a[i] == a[i]:
+                    return True
+                elif b[i] == b[i] and a[i] != a[i]:
+                    return False
+            for i in range(count):
+                if a[i] < b[i]:
                     return True
                 elif a[i] > b[i]:
                     return False
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to