sq method Null safety

Tensor<T> sq()

Calculates x * x (square) for each element.

Throws ArgumentError if tensor shapes are not equal.

Implementation

Tensor<T> sq() => (toBuilder()..sq()).build();