MCPcopy Create free account
hub / github.com/PyTables/PyTables / _process_range

Method _process_range

tables/leaf.py:528–548  ·  view source on GitHub ↗
(
        self,
        start: int,
        stop: int,
        step: int,
        dim: int | None = None,
        warn_negstep: bool = True,
    )

Source from the content-addressed store, hash-verified

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(

Callers 15

_process_range_readMethod · 0.95
iterrowsMethod · 0.45
__getitem__Method · 0.45
__setitem__Method · 0.45
itersequenceMethod · 0.45
itersortedMethod · 0.45
iterrowsMethod · 0.45
readMethod · 0.45
__getitem__Method · 0.45
__setitem__Method · 0.45
modify_rowsMethod · 0.45
modify_columnMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected