square#

rbc.stdlib.elementwise_functions.square(x)#

Squares (x_i * x_i) each element x_i of the input array x.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('double(double)')
... def array_api_square(x):
...     return array_api.square(x)
>>> array_api_square(4.0).execute()
16.0

Array-API ‘square’ doc