(
self,
start: int,
stop: int,
step: int,
dim: int | None = None,
warn_negstep: bool = True,
)
| 526 | |
| 527 | # This method is appropriate for calls to __getitem__ methods |
| 528 | def _process_range( |
| 529 | self, |
| 530 | start: int, |
| 531 | stop: int, |
| 532 | step: int, |
| 533 | dim: int | None = None, |
| 534 | warn_negstep: bool = True, |
| 535 | ) -> tuple[int, int, int]: |
| 536 | if dim is None: |
| 537 | nrows = self.nrows # self.shape[self.maindim] |
| 538 | else: |
| 539 | nrows = self.shape[dim] |
| 540 | |
| 541 | if warn_negstep and step and step < 0: |
| 542 | raise ValueError("slice step cannot be negative") |
| 543 | |
| 544 | # if start is not None: start = long(start) |
| 545 | # if stop is not None: stop = long(stop) |
| 546 | # if step is not None: step = long(step) |
| 547 | |
| 548 | return slice(start, stop, step).indices(int(nrows)) |
| 549 | |
| 550 | # This method is appropriate for calls to read() methods |
| 551 | def _process_range_read( |
no outgoing calls
no test coverage detected