sign#
- rbc.stdlib.elementwise_functions.sign(x)#
Returns an indication of the sign of a number for each element x_i of the input array x.
Examples
>>> from rbc.stdlib import array_api >>> @heavydb('double[](double[])') ... def array_api_sign(x): ... return array_api.sign(x) >>> array_api_sign([-5., 4.5]).execute() array([-1., 1.], dtype=float32)