- subtract(x1: array, x2: array, /) array ¶
Calculates the difference for each element
x1_iof the input array
x1with the respective element
x2_iof the input array
x2. The result of
x1_i - x2_imust be the same as
x1_i + (-x2_i)and must be governed by the same floating-point rules as addition (see
x1 (array) – first input array. Should have a numeric data type.
x2 (array) – second input array. Must be compatible with
x1(see Broadcasting). Should have a numeric data type.
out (array) – an array containing the element-wise differences. The returned array must have a data type determined by Type Promotion Rules.