summaryrefslogtreecommitdiff
path: root/numpy/lib/arrayterator.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-02-24 16:46:58 +0000
committerEric Wieser <wieser.eric@gmail.com>2017-02-24 16:46:58 +0000
commit48783e5ceb7f60c33db81ab72e5024f42b220990 (patch)
tree2284b780e521418b0e73fd7283403d3e7e28da50 /numpy/lib/arrayterator.py
parent5f5ccecbfc116284ed8c8d53cd8b203ceef5f7c7 (diff)
downloadnumpy-48783e5ceb7f60c33db81ab72e5024f42b220990.tar.gz
MAINT: replace len(x.shape) with x.ndim
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 fb52ada86..f2d4fe9fd 100644
--- a/numpy/lib/arrayterator.py
+++ b/numpy/lib/arrayterator.py
@@ -106,7 +106,7 @@ class Arrayterator(object):
if not isinstance(index, tuple):
index = (index,)
fixed = []
- length, dims = len(index), len(self.shape)
+ length, dims = len(index), self.ndim
for slice_ in index:
if slice_ is Ellipsis:
fixed.extend([slice(None)] * (dims-length+1))
@@ -186,7 +186,7 @@ class Arrayterator(object):
start = self.start[:]
stop = self.stop[:]
step = self.step[:]
- ndims = len(self.var.shape)
+ ndims = self.var.ndim
while True:
count = self.buf_size or reduce(mul, self.shape)