I would prefer to keep my original files intact.
In Python I can do







*import stringimport numpy as nprule = string.maketrans('D', 'E')data = 
np.loadtxt(fname, usecols=(2,3),\                  converters = {2: lambda 
val: float(val.translate(rule)),\                                3: lambda 
val: float(val.translate(rule))})*
By the way, is there a Julia equivalent to numpy's *loadtxt*? Because the 
files are in 3-column format with multiple spaces separating the 3 entries 
on each line and eol chars to separate the lines.

On Friday, July 18, 2014 12:33:23 PM UTC+2, Ivar Nesje wrote:
>
> If you have a reasonable editor, you should be able to open all your files 
> and issue a global search and replace operation that changes D to E. If you 
> have many files you can use sed to automate the process.
>
> kl. 11:41:12 UTC+2 fredag 18. juli 2014 skrev Andrei Berceanu følgende:
>>
>> Hi all,
>>
>> I have a lot of datafiles containing numbers in Fortran's double 
>> precision notation (http://math.hawaii.edu/wordpress/fortran-3/#double), 
>> i.e. 1.23D-3, instead of the usual E scientific notation.
>> Is there a simple way to import the data as Float64?
>>
>> Tnx!
>> Andrei
>>
>

Reply via email to