The floor()
function rounds a decimal down to the nearest lower integer.
For example, the floor of 3.1663.166 is 33.
Apply the floor operation to the elements of the following array:
import numpy as np arr = np.floor([-3.1666, 3.6667]) print(arr) |
The ceil()
function rounds a decimal up to the nearest upper integer.
For example, the ceiling of 3.1663.166 is 44.
Apply the ceiling operation to the elements of the following array:
import numpy as np arr = np.ceil([-3.1666, 3.6667]) print(arr) |