around
Round an array to the given number of decimals.| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | - | Input array. |
decimals | number | 0 | Number of decimal places to round to. 0 rounds to the nearest integer. Negative values round to powers of ten (e.g., -1 rounds to the nearest 10). |
NDArray — Array with each element rounded to the given number of decimals.
round
Alias foraround. Round an array to the given number of decimals.
| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | - | Input array. |
decimals | number | 0 | Number of decimal places. |
NDArray — Rounded array.
ceil
Return the ceiling of each element (smallest integer greater than or equal to each value).| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. |
NDArray — Element-wise ceiling.
floor
Return the floor of each element (largest integer less than or equal to each value).| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. |
NDArray — Element-wise floor.
fix
Round to the nearest integer toward zero.| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. |
NDArray — Element-wise value rounded toward zero (truncation toward zero).
rint
Round to the nearest integer, element-wise.| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. |
NDArray — Element-wise value rounded to the nearest integer.
trunc
Return the truncated value of each element (drop the fractional part).| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. |
NDArray — Element-wise integer part. Equivalent to fix.