[pypy-commit] pypy pypy-pyarray: merge default into branch

mattip noreply at buildbot.pypy.org
Fri Sep 20 12:08:32 CEST 2013


Author: Matti Picus <matti.picus at gmail.com>
Branch: pypy-pyarray
Changeset: r67024:5b21bc5371ad
Date: 2013-09-20 07:51 +0300
http://bitbucket.org/pypy/pypy/changeset/5b21bc5371ad/

Log:	merge default into branch

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
@@ -394,9 +394,12 @@
 
 def setitem_filter(arr, index, value, size):
     arr_iter = arr.create_iter()
-    index_iter = index.create_iter(arr.get_shape())
+    shapelen = len(arr.get_shape())
+    if shapelen > 1 and len(index.get_shape()) < 2:
+        index_iter = index.create_iter(arr.get_shape(), backward_broadcast=True)
+    else:
+        index_iter = index.create_iter()
     value_iter = value.create_iter([size])
-    shapelen = len(arr.get_shape())
     index_dtype = index.get_dtype()
     arr_dtype = arr.get_dtype()
     while not index_iter.done():


More information about the pypy-commit mailing list