Numpy's round() function returns each element rounded to the given number of decimals. The default value of the number of decimals is 0. Then you can apply astype(int) to convert them to integers.
Here is an example:
>>> import numpy as np>>> a = np.array([1.34,5.67,3.456,9.78])>>> aarray([1.34 , 5.67 , 3.456, 9.78 ])>>> np.round(a)array([ 1., 6., 3., 10.])>>> np.round(a).astype(int)array([ 1, 6, 3, 10])>>>
>>> import numpy as np
>>> a = np.array([1.34,5.67,3.456,9.78])
>>> a
array([1.34 , 5.67 , 3.456, 9.78 ])
>>> np.round(a)
array([ 1., 6., 3., 10.])
>>> np.round(a).astype(int)
array([ 1, 6, 3, 10])
>>>