add#

rbc.stdlib.elementwise_functions.add(x1, x2)#

Calculates the sum for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('int64[](int64[], int64[])')
... def array_api_add(x1, x2):
...     return array_api.add(x1, x2)
>>> array_api_add([1, -1], [3, 4]).execute()
array([4, 3])

Array-API ‘add’ doc