ceil#

rbc.stdlib.elementwise_functions.ceil(x)#

Rounds each element x_i of the input array x to the smallest (i.e., closest to -infinity) integer-valued number that is not less than x_i.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('double[](double[])')
... def array_api_ceil(x):
...     return array_api.ceil(x)
>>> arr = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0])
>>> array_api_ceil(arr).execute()
array([-1., -1., -0.,  1.,  2.,  2.,  2.], dtype=float32)

Array-API ‘ceil’ doc