min method

Tensor<T> min(
  1. Tensor<T> right
)

Calculates element-wise minimum.

The formula for result element i is:

min(elements[i], right.elements[i]);

Throws ArgumentError if tensor shapes are not equal.

Implementation

Tensor<T> min(Tensor<T> right) {
  final builder = toBuilder();
  builder.min(right);
  return builder.build();
}