I have a file with thousands of lines like this:

Signal was returned in 204 microseconds
Signal was returned in 184 microseconds
Signal was returned in 199 microseconds
Signal was returned in 4274 microseconds
Signal was returned in 202 microseconds
Signal was returned in 189 microseconds

I try to read it like this:


data = np.loadtxt('dummy.data', dtype={'names':('label','times','musec'), 
'fmts':('|S23','i8','|S13')})

It fails, I think, because it wants a string format and field for each of the 
words 'Signal' 'was' 'returned' etc.

Can I make it treat that whole string before the number as one string, one 
field?  All I really care about is the numbers anyway.

Any advice appreciated.

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to