[pypy-commit] pypy numpypy-out: now nothing works

mattip noreply at buildbot.pypy.org
Tue Feb 14 22:13:35 CET 2012


Author: mattip
Branch: numpypy-out
Changeset: r52478:01d2a5613fb2
Date: 2012-02-14 23:11 +0200
http://bitbucket.org/pypy/pypy/changeset/01d2a5613fb2/

Log:	now nothing works

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
@@ -773,6 +773,7 @@
 class Call1(VirtualArray):
     def __init__(self, ufunc, name, shape, calc_dtype, res_dtype, values,
                                                             out_arg=None):
+        xxx
         VirtualArray.__init__(self, name, shape, res_dtype, out_arg)
         self.values = values
         self.size = values.size
diff --git a/pypy/module/micronumpy/interp_ufuncs.py b/pypy/module/micronumpy/interp_ufuncs.py
--- a/pypy/module/micronumpy/interp_ufuncs.py
+++ b/pypy/module/micronumpy/interp_ufuncs.py
@@ -235,6 +235,8 @@
             out = None
         else:
             [w_obj, out] = args_w
+            if space.is_w(out, space.w_None):
+                out = None
         w_obj = convert_to_array(space, w_obj)
         calc_dtype = find_unaryop_result_dtype(space,
                                   w_obj.find_dtype(),
diff --git a/pypy/module/micronumpy/test/test_outarg.py b/pypy/module/micronumpy/test/test_outarg.py
--- a/pypy/module/micronumpy/test/test_outarg.py
+++ b/pypy/module/micronumpy/test/test_outarg.py
@@ -36,6 +36,7 @@
         a = array([[1, 2], [3, 4]])
         c = zeros((2,2,2))
         b = negative(a + a, out=c[1])
+        print c
         assert (b == [[-2, -4], [-6, -8]]).all()
         assert (c[:, :, 1] == [[0, 0], [-4, -8]]).all()
 


More information about the pypy-commit mailing list