div abstract method

void div(
  1. Tensor<T> right, {
  2. bool noNan = false,
  3. bool swapArguments = false,
})

Calculates fraction of two tensors.

The formula for result element i is:

x[i] = x[i] / scalar;

If swapArguments is true, the formula is:

x[i] = scalar / x[i];

If denominator is 0.0, the result is double.nan when using floating-point numbers and 0 when using integers. If noNan is true, the result is 0 when using floating-point numbers.

Throws ArgumentError if tensor shapes are not equal.

Throws ArgumentError if tensor shapes are not equal.

Implementation

void div(Tensor<T> right, {bool noNan = false, bool swapArguments = false});