collapse method

Tensor<T> collapse({
  1. int axis = 0,
})

Returns a view with a single-element axis at axis removed.

Implementation

Tensor<T> collapse({int axis = 0}) => Tensor<T>.internal(
    type: type, layout: layout.collapse(axis: axis), data: data);