Run »
import numpy as np arr = np.array([1.1, 2.1, 3.1]) newarr = arr.astype('i') print(newarr) print(newarr.dtype)
[1 2 3]
int32