.astype(np.float32) code example
Example 1: np float to int
int_array = float_array.astype(int)
Example 2: np as type
>>> x.astype(int)
array([1, 2, 2])
int_array = float_array.astype(int)
>>> x.astype(int)
array([1, 2, 2])