toTensor method

Tensor<T> toTensor({
  1. List<int>? shape,
  2. List<int>? strides,
  3. DataType<T>? type,
})

Returns a Tensor from the given iterable.

Implementation

Tensor<T> toTensor(
        {List<int>? shape, List<int>? strides, DataType<T>? type}) =>
    Tensor<T>.fromIterable(this, shape: shape, strides: strides, type: type);