Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r70762:acdd090d79d7
Date: 2014-04-18 16:28 -0400
http://bitbucket.org/pypy/pypy/changeset/acdd090d79d7/

Log:    small cleanups for flatiter

diff --git a/pypy/module/micronumpy/flatiter.py 
b/pypy/module/micronumpy/flatiter.py
--- a/pypy/module/micronumpy/flatiter.py
+++ b/pypy/module/micronumpy/flatiter.py
@@ -35,7 +35,7 @@
         self.iter, self.state = self.base.create_iter()
 
     def descr_len(self, space):
-        return space.wrap(self.base.get_size())
+        return space.wrap(self.iter.size)
 
     def descr_next(self, space):
         if self.iter.done(self.state):
@@ -48,8 +48,7 @@
         return space.wrap(self.state.index)
 
     def descr_coords(self, space):
-        coords = self.base.to_coords(space, space.wrap(self.state.index))
-        return space.newtuple([space.wrap(c) for c in coords])
+        return space.newtuple([space.wrap(c) for c in self.state.indices])
 
     def descr_getitem(self, space, w_idx):
         if not (space.isinstance_w(w_idx, space.w_int) or
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to