Author: mattip <[email protected]>
Branch: nditer-revisited
Changeset: r78684:8da2f287bcdf
Date: 2015-07-27 06:35 +0300
http://bitbucket.org/pypy/pypy/changeset/8da2f287bcdf/
Log: protect from empty iterator
diff --git a/pypy/module/micronumpy/nditer.py b/pypy/module/micronumpy/nditer.py
--- a/pypy/module/micronumpy/nditer.py
+++ b/pypy/module/micronumpy/nditer.py
@@ -283,6 +283,8 @@
of shape (4,3) by setting the offset to the beginning of the data at each
iteration
'''
shape = [s+1 for s in old_iter.shape_m1]
+ if len(shape) < 1:
+ return old_iter
strides = old_iter.strides
backstrides = old_iter.backstrides
if order == 'F':
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit