ceil¶
- ceil(x: array, /) array ¶
Rounds each element
x_i
of the input arrayx
to the smallest (i.e., closest to-infinity
) integer-valued number that is not less thanx_i
.Special cases
If
x_i
is already integer-valued, the result isx_i
.
For floating-point operands,
If
x_i
is+infinity
, the result is+infinity
.If
x_i
is-infinity
, the result is-infinity
.If
x_i
is+0
, the result is+0
.If
x_i
is-0
, the result is-0
.If
x_i
isNaN
, the result isNaN
.
- Parameters:
x (array) – input array. Should have a numeric data type.
- Returns:
out (array) – an array containing the rounded result for each element in
x
. The returned array must have the same data type asx
.