Commits

Brian Kearns  committed acdd090

small cleanups for flatiter

  • Participants
  • Parent commits 667ad75

Comments (0)

Files changed (1)

File pypy/module/micronumpy/flatiter.py

         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):
         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