[Tutor] create numpy array from list of strings

washakie washakie at gmail.com
Tue Jun 3 23:45:06 CEST 2008


Hello, I have a list of strings:
data = 
[ '33386.47    2.22    -1.11   0.43'
'33386.67     3.33     -1.23  0.54'
 ...
'46728.47    0.1    -1.87    -0.54'
'46728.47    9.7    5.68    0.38'
'46729.47    -0.17    -0.47    0.23']

I wish to convert it to a numpy array of floats. How do I accomplish this?

THanks!!
-- 
View this message in context: http://www.nabble.com/create-numpy-array-from-list-of-strings-tp17634509p17634509.html
Sent from the Python - tutor mailing list archive at Nabble.com.



More information about the Tutor mailing list