getRange method

Tensor<T> getRange(
  1. int start,
  2. int? end, {
  3. int step = 1,
  4. int axis = 0,
})

Returns a view with the given axis sliced to the range between start and end (exclusive).

Implementation

Tensor<T> getRange(int start, int? end, {int step = 1, int axis = 0}) =>
    Tensor<T>.internal(
        type: type,
        layout: layout.getRange(start, end, step: step, axis: axis),
        data: data);