MCPcopy
hub / github.com/ray-project/ray / slice

Method slice

python/ray/data/block.py:414–425  ·  view source on GitHub ↗

Return a slice of this block. Args: start: The starting index of the slice (inclusive). end: The ending index of the slice (exclusive). copy: Whether to perform a data copy for the slice. Returns: The sliced block result.

(self, start: int, end: int, copy: bool = False)

Source from the content-addressed store, hash-verified

412 raise NotImplementedError
413
414 def slice(self, start: int, end: int, copy: bool = False) -> Block:
415 """Return a slice of this block.
416
417 Args:
418 start: The starting index of the slice (inclusive).
419 end: The ending index of the slice (exclusive).
420 copy: Whether to perform a data copy for the slice.
421
422 Returns:
423 The sliced block result.
424 """
425 raise NotImplementedError
426
427 def take(self, indices: List[int]) -> Block:
428 """Return a new block containing the provided row indices.

Callers 15

_iter_groups_sortedMethod · 0.95
_apply_udf_to_groupsFunction · 0.45
from_arrowFunction · 0.45
hFunction · 0.45
DFunction · 0.45
eFunction · 0.45
$Function · 0.45

Calls

no outgoing calls

Tested by 1

_chunk_table_in_halfFunction · 0.36