2011/6/3 Bruce Southey
> On 06/03/2011 10:33 AM, jonasr wrote:
> >
> >
> > Bruce Southey wrote:
> >> On 06/03/2011 09:33 AM, jonasr wrote:
> >>> thank you very much, works much nicer and faster in comparison to the
> >>> script
> >>> i wrote and used before ,
> >>> im not that much used to lambd
On 06/03/2011 10:33 AM, jonasr wrote:
>
>
> Bruce Southey wrote:
>> On 06/03/2011 09:33 AM, jonasr wrote:
>>> thank you very much, works much nicer and faster in comparison to the
>>> script
>>> i wrote and used before ,
>>> im not that much used to lambda forms but it seems quit usefull in
>>> si
Bruce Southey wrote:
>
> On 06/03/2011 09:33 AM, jonasr wrote:
>> thank you very much, works much nicer and faster in comparison to the
>> script
>> i wrote and used before ,
>> im not that much used to lambda forms but it seems quit usefull in
>> situations like this
>>
>>
>> Olivier Delallea
On 06/03/2011 09:33 AM, jonasr wrote:
thank you very much, works much nicer and faster in comparison to the script
i wrote and used before ,
im not that much used to lambda forms but it seems quit usefull in
situations like this
Olivier Delalleau-2 wrote:
Here's an ugly one-liner:
numpy.genf
thank you very much, works quit nice and faster in comparison to the script i
wrote and used before ,
im not that much used to lambda forms but it seems quit usefull in
situations like this
Olivier Delalleau-2 wrote:
>
> Here's an ugly one-liner:
>
> numpy.genfromtxt('data.txt', converters=d
I think the easiest is to use an intermediate string. If your file is test.txt,
In [22]: a = file('test.txt').read().replace(',','.')
In [23]: import StringIO
In [24]: b=genfromtxt(StringIO.StringIO(a))
In [25]: b
Out[25]:
array([[ 0.e+00, 1.2210e-03, 1.2210e-03,
0.00
Here's an ugly one-liner:
numpy.genfromtxt('data.txt', converters=dict([k, lambda x:
float(x.replace(',', '.'))] for k in
range(len(open('data.txt').readline().strip().split()
-=- Olivier
2011/6/3 jgrub
>
> Hello, im actually try to read in data with genfromtxt(),
> i want to read in numb
Hello, im actually try to read in data with genfromtxt(),
i want to read in numbers which are stored in a textfile like this:
0,000,0012210,0012210,001,278076
160,102539
4,00E-7 0,000,000,0024411,279297