[pypy-commit] pypy numpy-dtype-refactor: fix a bunch of tests, not sure how I ddi'nt catch this before

alex_gaynor noreply at buildbot.pypy.org
Sat Nov 19 21:54:04 CET 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-dtype-refactor
Changeset: r49554:43e36f217520
Date: 2011-11-19 15:53 -0500
http://bitbucket.org/pypy/pypy/changeset/43e36f217520/

Log:	fix a bunch of tests, not sure how I ddi'nt catch this before

diff --git a/pypy/module/micronumpy/interp_boxes.py b/pypy/module/micronumpy/interp_boxes.py
--- a/pypy/module/micronumpy/interp_boxes.py
+++ b/pypy/module/micronumpy/interp_boxes.py
@@ -112,19 +112,19 @@
     descr__new__, get_dtype = new_dtype_getter("int8")
 
 class W_UInt8Box(W_UnsignedIntgerBox, PrimitiveBox):
-    pass
+    descr__new__, get_dtype = new_dtype_getter("uint8")
 
 class W_Int16Box(W_SignedIntegerBox, PrimitiveBox):
-    pass
+    descr__new__, get_dtype = new_dtype_getter("int16")
 
 class W_UInt16Box(W_UnsignedIntgerBox, PrimitiveBox):
-    pass
+    descr__new__, get_dtype = new_dtype_getter("uint16")
 
 class W_Int32Box(W_SignedIntegerBox, PrimitiveBox):
     pass
 
 class W_UInt32Box(W_UnsignedIntgerBox, PrimitiveBox):
-    pass
+    descr__new__, get_dtype = new_dtype_getter("uint32")
 
 class W_LongBox(W_SignedIntegerBox, PrimitiveBox):
     descr__new__, get_dtype = new_dtype_getter("long")
diff --git a/pypy/module/micronumpy/interp_ufuncs.py b/pypy/module/micronumpy/interp_ufuncs.py
--- a/pypy/module/micronumpy/interp_ufuncs.py
+++ b/pypy/module/micronumpy/interp_ufuncs.py
@@ -252,7 +252,7 @@
         dtype = w_obj.get_dtype(space)
         if current_guess is None:
             return dtype
-        return find_binop_result_dtype(dtype, current_guess)
+        return find_binop_result_dtype(space, dtype, current_guess)
 
     if space.isinstance_w(w_obj, space.w_bool):
         if current_guess is None or current_guess is bool_dtype:


More information about the pypy-commit mailing list