Get the next element of the array during an iteration. The element is returned as a list of objects of the current flavor.
(self)
| 625 | self.nrow = SizeType(self._start - self._step) # row number |
| 626 | |
| 627 | def __next__(self) -> list | np.ndarray: |
| 628 | """Get the next element of the array during an iteration. |
| 629 | |
| 630 | The element is returned as a list of objects of the current |
| 631 | flavor. |
| 632 | |
| 633 | """ |
| 634 | if self._nrowsread >= self._stop: |
| 635 | self._init = False |
| 636 | raise StopIteration # end of iteration |
| 637 | else: |
| 638 | # Read a chunk of rows |
| 639 | if self._row + 1 >= self.nrowsinbuf or self._row < 0: |
| 640 | self._stopb = self._startb + self._step * self.nrowsinbuf |
| 641 | self.listarr = self.read(self._startb, self._stopb, self._step) |
| 642 | self._row = -1 |
| 643 | self._startb = self._stopb |
| 644 | self._row += 1 |
| 645 | self.nrow += self._step |
| 646 | self._nrowsread += self._step |
| 647 | return self.listarr[self._row] |
| 648 | |
| 649 | def __getitem__( |
| 650 | self, key: int | slice | Sequence[int] | np.ndarray |