[pypy-commit] pypy numpy-subarrays: Start fixing translation

rguillebert noreply at buildbot.pypy.org
Sat May 11 20:27:52 CEST 2013


Author: Romain Guillebert <romain.py at gmail.com>
Branch: numpy-subarrays
Changeset: r63990:3842cf257b00
Date: 2013-05-11 20:27 +0200
http://bitbucket.org/pypy/pypy/changeset/3842cf257b00/

Log:	Start fixing translation

diff --git a/pypy/module/micronumpy/interp_dtype.py b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -114,7 +114,7 @@
         return space.wrap(self.itemtype.alignment)
 
     def descr_get_subdtype(self, space):
-        return space.newtuple([space.wrap(self.subdtype), space.newtuple(shape)])
+        return space.newtuple([space.wrap(self.subdtype), space.newtuple(self.shape)])
 
     def descr_get_shape(self, space):
         return space.newtuple(self.shape)
@@ -350,6 +350,7 @@
 
     if w_shape is not None and space.len_w(w_shape) > 0:
         subdtype = descr__new__(space, w_subtype, w_dtype, w_align, w_copy)
+        assert isinstance(subdtype, W_Dtype)
         size = 1
         shape = space.listview(w_shape)
         for dim in shape:


More information about the pypy-commit mailing list