turn int array into float python code example
Example 1: convert all values in array into float
import numpy as np
x = np.array(['1.1', '2.2', '3.3'])
y = x.astype(np.float)
Example 2: int to float python
a = 5
a = float(a) # int to float
import numpy as np
x = np.array(['1.1', '2.2', '3.3'])
y = x.astype(np.float)
a = 5
a = float(a) # int to float