slice

fun DTensor.slice(start: Int, end: Int, axis: Int = 0): DTensor

Return a slice of the input tensor, which includes only some of the indices at axis. Specifically, it includes indices from start (inclusive) until end (exclusive).


fun FloatTensor.slice(start: Int, end: Int, axis: Int = 0): FloatTensor