summaryrefslogtreecommitdiff
path: root/numpy/lib/arrayterator.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/arrayterator.py')
-rw-r--r--numpy/lib/arrayterator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/arrayterator.py b/numpy/lib/arrayterator.py
index d9839feeb..4aa977c46 100644
--- a/numpy/lib/arrayterator.py
+++ b/numpy/lib/arrayterator.py
@@ -182,7 +182,7 @@ class Arrayterator(object):
def __iter__(self):
# Skip arrays with degenerate dimensions
if [dim for dim in self.shape if dim <= 0]:
- raise StopIteration
+ return
start = self.start[:]
stop = self.stop[:]
@@ -223,4 +223,4 @@ class Arrayterator(object):
start[i] = self.start[i]
start[i-1] += self.step[i-1]
if start[0] >= self.stop[0]:
- raise StopIteration
+ return