Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r67023:c5b518756cc3 Date: 2013-09-20 07:50 +0300 http://bitbucket.org/pypy/pypy/changeset/c5b518756cc3/
Log: copy logic from getitem_filter to setitem_filter 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 @@ -374,9 +374,12 @@ def setitem_filter(arr, index, value, size): arr_iter = arr.create_iter() - index_iter = index.create_iter(index.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(): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit