Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

string array to float array python

import numpy as np
x = np.array(['1.1', '2.2', '3.3'])
y = x.astype(np.float)
print(y) # Output : [1.1, 2.2, 3.3]
 
PREVIOUS NEXT
Tagged: #string #array #float #array #python
ADD COMMENT
Topic
Name
6+9 =