around
Round an array to the given number of decimals.
Returns:
NDArray — Array with each element rounded to the given number of decimals.
Changed in v1.7.0: integer input with
decimals >= 0 has nothing to round, so it now comes back as a view of the input rather than a copy. This matches NumPy. Writes to the result reach the input array, so call .copy() if you need an independent buffer. base is set on exactly the results that alias.round
Alias foraround. Round an array to the given number of decimals.
Returns:
NDArray — Rounded array.
Changed in v1.7.0: integer input with
decimals >= 0 has nothing to round, so it now comes back as a view of the input rather than a copy. This matches NumPy. Writes to the result reach the input array, so call .copy() if you need an independent buffer. base is set on exactly the results that alias.ceil
Return the ceiling of each element (smallest integer greater than or equal to each value).
Returns:
NDArray — Element-wise ceiling.
floor
Return the floor of each element (largest integer less than or equal to each value).
Returns:
NDArray — Element-wise floor.
fix
Round to the nearest integer toward zero.
Returns:
NDArray — Element-wise value rounded toward zero (truncation toward zero).
rint
Round to the nearest integer, element-wise.
Returns:
NDArray — Element-wise value rounded to the nearest integer.
trunc
Return the truncated value of each element (drop the fractional part).
Returns:
NDArray — Element-wise integer part. Equivalent to fix.