[pypy-commit] pypy ndarray-subtype: test, fix call2 for array, non-array
mattip
noreply at buildbot.pypy.org
Wed Jul 17 19:18:28 CEST 2013
Author: Matti Picus <matti.picus at gmail.com>
Branch: ndarray-subtype
Changeset: r65447:cf08f4e9b3d8
Date: 2013-07-17 20:17 +0300
http://bitbucket.org/pypy/pypy/changeset/cf08f4e9b3d8/
Log: test, fix call2 for array, non-array
diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py
--- a/pypy/module/micronumpy/loop.py
+++ b/pypy/module/micronumpy/loop.py
@@ -40,7 +40,6 @@
rhs_type = space.type(w_rhs.base)
rhs_for_subtype = w_rhs.base
if space.is_w(lhs_type, w_ndarray) and not space.is_w(rhs_type, w_ndarray):
- w_lhs, w_rhs = w_rhs, w_lhs
lhs_for_subtype = rhs_for_subtype
# TODO handle __array_priorities__ and maybe flip the order
diff --git a/pypy/module/micronumpy/test/test_subtype.py b/pypy/module/micronumpy/test/test_subtype.py
--- a/pypy/module/micronumpy/test/test_subtype.py
+++ b/pypy/module/micronumpy/test/test_subtype.py
@@ -199,6 +199,9 @@
assert isinstance(c, self.SubType)
c = a + b
assert isinstance(c, self.NoNew)
+ d = range(12)
+ e = a - d
+ assert isinstance(e, self.NoNew)
def test_sub_call1(self):
from numpypy import array, sqrt
More information about the pypy-commit
mailing list