Coverage for python/lsst/afw/math/spatialCell/spatialCellContinued.py : 27%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
while True: try: yield self.__deref__() except NotFoundError: return self.__incr__()
return self.begin().__iter__()
idx = int(idx) num_cells = len(self) if idx < -num_cells or idx >= num_cells: raise IndexError("idx={} < -{} or >= {})".format(idx, num_cells, num_cells)) if idx < 0: idx += num_cells for i, cell in enumerate(self): if i >= idx: return cell
|