Re: [Numpy-discussion] String manipulation summary

2009-07-27 Thread Christopher Barker
Chris Colbert wrote: > what machine spec are you using? Dual 2Ghz PPC OS-X 10.4. Python2.5, numpy 1.3.0rc1 (hmm -- I should upgrade that!) > Using your last function line2array5 WITH float conversion, i get the > following timing on a mobile quad core extreme: > > In [24]: a = np.arange(100).a

Re: [Numpy-discussion] String manipulation summary

2009-07-27 Thread Chris Colbert
what machine spec are you using? Using your last function line2array5 WITH float conversion, i get the following timing on a mobile quad core extreme: In [24]: a = np.arange(100).astype(str).tostring() In [25]: a Out[25]: '012345678911223344556677

[Numpy-discussion] String manipulation summary

2009-07-27 Thread Christopher Barker
Hi all, When I first saws this problem: reading in a fixed-width text file as numbers, it struck me that you really should be able to do it, and do it well, with numpy by slicing character arrays. I got carried away, and worked out a number of ways to do it. Lastly was a method inspired by a