Standard iterator method, returns the index tuple and array value. Returns ------- coords : tuple of ints The indices of the current iteration. val : scalar The array element of the current iteration.
(self)
| 598 | self.iter = np.asarray(arr).flat |
| 599 | |
| 600 | def __next__(self): |
| 601 | """ |
| 602 | Standard iterator method, returns the index tuple and array value. |
| 603 | |
| 604 | Returns |
| 605 | ------- |
| 606 | coords : tuple of ints |
| 607 | The indices of the current iteration. |
| 608 | val : scalar |
| 609 | The array element of the current iteration. |
| 610 | |
| 611 | """ |
| 612 | return self.iter.coords, next(self.iter) |
| 613 | |
| 614 | def __iter__(self): |
| 615 | return self |