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.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/numpy/lib/arrayterator.py b/numpy/lib/arrayterator.py
index 15b0f8aa9..b9ea21f8e 100644
--- a/numpy/lib/arrayterator.py
+++ b/numpy/lib/arrayterator.py
@@ -10,8 +10,6 @@ a user-specified number of elements.
from operator import mul
from functools import reduce
-from numpy.compat import long
-
__all__ = ['Arrayterator']
@@ -108,7 +106,7 @@ class Arrayterator:
if slice_ is Ellipsis:
fixed.extend([slice(None)] * (dims-length+1))
length = len(fixed)
- elif isinstance(slice_, (int, long)):
+ elif isinstance(slice_, int):
fixed.append(slice(slice_, slice_+1, 1))
else:
fixed.append(slice_)
@@ -161,8 +159,7 @@ class Arrayterator:
"""
for block in self:
- for value in block.flat:
- yield value
+ yield from block.flat
@property
def shape(self):