Author: mattip
Branch: missing-ndarray-attributes
Changeset: r60729:2bdcf6e1287e
Date: 2013-01-30 15:09 +0200
http://bitbucket.org/pypy/pypy/changeset/2bdcf6e1287e/

Log:    detour around strange translation problem

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
@@ -82,12 +82,12 @@
 
 def argsort_array(arr, space, w_axis):
     itemtype = arr.dtype.itemtype
-    if isinstance(itemtype, types.Float) or \
-           isinstance(itemtype, types.Integer) or \
-           isinstance(itemtype, types.ComplexFloating):
-        pass   
-    else:    
-        raise OperationError(space.w_NotImplementedError,
+    ok_to_continue = isinstance(itemtype, types.Float)
+    if  isinstance(itemtype, types.Integer):
+        ok_to_continue = True
+    if isinstance(itemtype, types.ComplexFloating):
+        ok_to_continue = True
+    if not ok_to_continue:
            space.wrap("sorting of non-numeric types " + \
                       "'%s' is not implemented" % arr.dtype.get_name() ))
     if w_axis is space.w_None:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to