pow#

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

Calculates an implementation-dependent approximation of exponentiation by raising each element x1_i (the base) of the input array x1 to the power of x2_i (the exponent), where x2_i is the corresponding element of the input array x2.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('int64[](int64[], int64)')
... def array_api_pow(x1, x2):
...     return array_api.pow(x1, x2)
>>> x1 = np.arange(6)
>>> array_api_pow(x1, 3).execute()
array([  0,   1,   8,  27,  64, 125])

Array-API ‘pow’ doc