[pypy-commit] pypy fix-result-types: small cleanup

rlamy noreply at buildbot.pypy.org
Sun May 10 21:31:03 CEST 2015


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: fix-result-types
Changeset: r77285:61a3a04f2303
Date: 2015-05-10 17:41 +0100
http://bitbucket.org/pypy/pypy/changeset/61a3a04f2303/

Log:	small cleanup

diff --git a/pypy/module/micronumpy/ufuncs.py b/pypy/module/micronumpy/ufuncs.py
--- a/pypy/module/micronumpy/ufuncs.py
+++ b/pypy/module/micronumpy/ufuncs.py
@@ -571,15 +571,11 @@
         raise oefmt(space.w_NotImplementedError, 'not implemented yet')
 
     def call(self, space, args_w, sig, casting, extobj):
-        inargs = [None] * self.nin
         if len(args_w) < self.nin:
             raise oefmt(space.w_ValueError,
                  '%s called with too few input args, expected at least %d got %d',
                  self.name, self.nin, len(args_w))
-        for i in range(self.nin):
-            inargs[i] = convert_to_array(space, args_w[i])
-        for i in inargs:
-            assert isinstance(i, W_NDimArray)
+        inargs = [convert_to_array(space, args_w[i]) for i in range(self.nin)]
         outargs = [None] * self.nout
         for i in range(len(args_w)-self.nin):
             out = args_w[i+self.nin]


More information about the pypy-commit mailing list