Tensor.slice()
Returns the slice of the tensor.
Usage
from tinygrad.tensor import Tensor
a1 = Tensor([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
a1 = a1.slice([(0, 2), (1, 0)], 0)
print(a1)
Return value
<Tensor <LB (2, -1) dtypes.float op=MovementOps.SHRINK st=ShapeTracker(shape=(2, -1), views=[View(shape=(2, -1), strides=(3, 1), offset=1, mask=None, contiguous=False, shape_strides=((2, 3), (-1, 1)))], var_vals={})> on GPU with grad None>