[pypy-commit] pypy numpy-dtype-refactor: first few translation fixes

alex_gaynor noreply at buildbot.pypy.org
Fri Nov 11 20:04:27 CET 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-dtype-refactor
Changeset: r49338:8c2614b0fc36
Date: 2011-11-11 14:04 -0500
http://bitbucket.org/pypy/pypy/changeset/8c2614b0fc36/

Log:	first few translation fixes

diff --git a/pypy/module/micronumpy/compile.py b/pypy/module/micronumpy/compile.py
--- a/pypy/module/micronumpy/compile.py
+++ b/pypy/module/micronumpy/compile.py
@@ -224,7 +224,7 @@
             raise NotImplementedError
         if (not isinstance(w_res, BaseArray) and
             not isinstance(w_res, interp_boxes.W_GenericBox)):
-            dtype = interp.space.fromcache(W_Float64Dtype)
+            dtype = get_dtype_cache(interp.space).w_float64dtype
             w_res = scalar_w(interp.space, dtype, w_res)
         return w_res
 
@@ -334,9 +334,9 @@
             if isinstance(w_res, BaseArray):
                 return w_res
             if isinstance(w_res, FloatObject):
-                dtype = interp.space.fromcache(W_Float64Dtype)
+                dtype = get_dtype_cache(interp.space).w_float64dtype
             elif isinstance(w_res, BoolObject):
-                dtype = interp.space.fromcache(W_BoolDtype)
+                dtype = get_dtype_cache(interp.space).w_booldtype
             elif isinstance(w_res, interp_boxes.W_GenericBox):
                 dtype = w_res.get_dtype(interp.space)
             else:


More information about the pypy-commit mailing list