Multiply

Multiply

Multiplies the inputs element by element.

Inputs

a
a numeric (scalar) value, matrix or tensor.
b
a numeric (scalar) value, matrix or tensor.

If both a and b are non-scalar (matrix or tensor), their dimensions must be the same.

Outputs

result
If both inputs are scalar, the output is a scalar value. If either of the inputs is non-scalar, the output is of the same type as the inputs (i.e. either a matrix or tensor). If one input is scalar and the other input is non-scalar, the output is non-scalar and the values are determined by multiplying each element of the non-scalar input with the scalar input. The number format will be expanded so that there is no loss of accuracy. For example, multiplying an integer with a floating point number returns a floating point number.

Inherits ArithmeticTool.