Step

data class Step<T : DType, V>(val start: Int, val end: Int, val step: Int) : Slice<T, V> (source)

Represents strided access with custom step size.

Step slices select elements at regular intervals along a dimension, similar to Python's tensor[start:end:step] notation. This enables efficient subsampling and stride-based operations.

Characteristics

  • Configurable sampling interval

  • May create non-contiguous patterns

  • Useful for downsampling operations

  • Custom stride calculation required

Parameters

start

the starting index (inclusive)

end

the ending index (exclusive)

step

the step size (must be positive)

Constructors

Link copied to clipboard
constructor(start: Int, end: Int, step: Int)

Properties

Link copied to clipboard
val end: Int
Link copied to clipboard
val start: Int
Link copied to clipboard
val step: Int