operator [] method

Tensor<T> operator [](
  1. int index
)

Returns a view with the first axis resolved to index.

Implementation

Tensor<T> operator [](int index) =>
    Tensor<T>.internal(type: type, layout: layout[index], data: data);