[pypy-commit] pypy numpy-dtype-alt: Some RPython-ification.

alex_gaynor noreply at buildbot.pypy.org
Sun Aug 7 23:43:34 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-dtype-alt
Changeset: r46351:858ea3d7f1a7
Date: 2011-08-07 14:40 -0700
http://bitbucket.org/pypy/pypy/changeset/858ea3d7f1a7/

Log:	Some RPython-ification.

diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -300,7 +300,9 @@
         return w_obj
     elif space.issequence_w(w_obj):
         # Convert to array.
-        return space.call_function(space.gettypefor(BaseArray), w_obj)
+        w_obj = space.call_function(space.gettypefor(BaseArray), w_obj)
+        assert isinstance(w_obj, BaseArray)
+        return w_obj
     else:
         # If it's a scalar
         return FloatWrapper(space.float_w(w_obj))


More information about the pypy-commit mailing list