Author: Brian Kearns <bdkea...@gmail.com>
Branch: 
Changeset: r69524:8df8a01902f8
Date: 2014-02-27 11:47 -0500
http://bitbucket.org/pypy/pypy/changeset/8df8a01902f8/

Log:    just get this field from the array object

diff --git a/pypy/module/micronumpy/iterators.py 
b/pypy/module/micronumpy/iterators.py
--- a/pypy/module/micronumpy/iterators.py
+++ b/pypy/module/micronumpy/iterators.py
@@ -79,13 +79,12 @@
 
 
 class ArrayIterator(object):
-    _immutable_fields_ = ['array', 'start', 'size', 'ndim_m1', 'shape_m1',
+    _immutable_fields_ = ['array', 'size', 'ndim_m1', 'shape_m1',
                           'strides', 'backstrides']
 
     def __init__(self, array, size, shape, strides, backstrides):
         assert len(shape) == len(strides) == len(backstrides)
         self.array = array
-        self.start = array.start
         self.size = size
         self.ndim_m1 = len(shape) - 1
         self.shape_m1 = [s - 1 for s in shape]
@@ -96,7 +95,7 @@
     def reset(self):
         self.index = 0
         self.indices = [0] * (self.ndim_m1 + 1)
-        self.offset = self.start
+        self.offset = self.array.start
 
     @jit.unroll_safe
     def next(self):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to