diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 2569a0f6e..8959d2b91 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -316,6 +316,30 @@ Calculates the division for each element `x1_i` of the input array `x1` with the #### Returns +- **out**: _<array>_ + + - an array containing the element-wise results. + +### # equal(x1, x2, /, *, out=None) + +Computes the truth value of `x1_i == x2_i` for each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array `x2`. + +#### Parameters + +- **x1**: _<array>_ + + - first input array. + +- **x2**: _<array>_ + + - second input array. Must be compatible with `x1` (see :ref:`broadcasting`). + +- **out**: _Optional\[ <array> ]_ + + - output array. If provided, the output array must be compatible with the provided input arrays (see :ref:`broadcasting`). If not provided or is `None`, an uninitialized return array, whose underlying data type is `bool`, must be created and then filled with the result of each element-wise computation. Default: `None`. + +#### Returns + - **out**: _<array>_ - an array containing the element-wise results. @@ -368,6 +392,102 @@ Rounds each element `x_i` of the input array `x` to the greatest (i.e., closest - an array containing the rounded result for each element in `x`. +### # greater(x1, x2, /, *, out=None) + +Computes the truth value of `x1_i > x2_i` for each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array `x2`. + +#### Parameters + +- **x1**: _<array>_ + + - first input array. + +- **x2**: _<array>_ + + - second input array. Must be compatible with `x1` (see :ref:`broadcasting`). + +- **out**: _Optional\[ <array> ]_ + + - output array. If provided, the output array must be compatible with the provided input arrays (see :ref:`broadcasting`). If not provided or is `None`, an uninitialized return array, whose underlying data type is `bool`, must be created and then filled with the result of each element-wise computation. Default: `None`. + +#### Returns + +- **out**: _<array>_ + + - an array containing the element-wise results. + +### # greater_equal(x1, x2, /, *, out=None) + +Computes the truth value of `x1_i >= x2_i` for each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array `x2`. + +#### Parameters + +- **x1**: _<array>_ + + - first input array. + +- **x2**: _<array>_ + + - second input array. Must be compatible with `x1` (see :ref:`broadcasting`). + +- **out**: _Optional\[ <array> ]_ + + - output array. If provided, the output array must be compatible with the provided input arrays (see :ref:`broadcasting`). If not provided or is `None`, an uninitialized return array, whose underlying data type is `bool`, must be created and then filled with the result of each element-wise computation. Default: `None`. + +#### Returns + +- **out**: _<array>_ + + - an array containing the element-wise results. + +### # less(x1, x2, /, *, out=None) + +Computes the truth value of `x1_i < x2_i` for each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array `x2`. + +#### Parameters + +- **x1**: _<array>_ + + - first input array. + +- **x2**: _<array>_ + + - second input array. Must be compatible with `x1` (see :ref:`broadcasting`). + +- **out**: _Optional\[ <array> ]_ + + - output array. If provided, the output array must be compatible with the provided input arrays (see :ref:`broadcasting`). If not provided or is `None`, an uninitialized return array, whose underlying data type is `bool`, must be created and then filled with the result of each element-wise computation. Default: `None`. + +#### Returns + +- **out**: _<array>_ + + - an array containing the element-wise results. + +### # less_equal(x1, x2, /, *, out=None) + +Computes the truth value of `x1_i <= x2_i` for each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array `x2`. + +#### Parameters + +- **x1**: _<array>_ + + - first input array. + +- **x2**: _<array>_ + + - second input array. Must be compatible with `x1` (see :ref:`broadcasting`). + +- **out**: _Optional\[ <array> ]_ + + - output array. If provided, the output array must be compatible with the provided input arrays (see :ref:`broadcasting`). If not provided or is `None`, an uninitialized return array, whose underlying data type is `bool`, must be created and then filled with the result of each element-wise computation. Default: `None`. + +#### Returns + +- **out**: _<array>_ + + - an array containing the element-wise results. + ### # log(x, /, *, out=None) Calculates an implementation-dependent approximation to the natural (base `e`) logarithm, having domain `[0, +infinity]` and codomain `[-infinity, +infinity]`, for each element `x_i` of the input array `x`. @@ -420,6 +540,30 @@ Calculates the product for each element `x1_i` of the input array `x1` with the - an array containing the element-wise products. +### # not_equal(x1, x2, /, *, out=None) + +Computes the truth value of `x1_i != x2_i` for each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array `x2`. + +#### Parameters + +- **x1**: _<array>_ + + - first input array. + +- **x2**: _<array>_ + + - second input array. Must be compatible with `x1` (see :ref:`broadcasting`). + +- **out**: _Optional\[ <array> ]_ + + - output array. If provided, the output array must be compatible with the provided input arrays (see :ref:`broadcasting`). If not provided or is `None`, an uninitialized return array, whose underlying data type is `bool`, must be created and then filled with the result of each element-wise computation. Default: `None`. + +#### Returns + +- **out**: _<array>_ + + - an array containing the element-wise results. + ### # round(x, /, *, out=None) Rounds each element `x_i` of the input array `x` to the nearest integer-valued number.