[Numpy-discussion] convert FORTRAN exponential format text to float

Thomas Kirk Gamble tkg at lanl.gov
Wed Sep 29 12:32:48 EDT 2010


On Wed, 2010-09-29 at 16:36 +0200, David Froger wrote:
> Did you try loadtxt? I try to output something in the format 1.538D-06
> with Fortran in order to test reading it with loadtxt, but I always
> get 1.538E-06. Where does the 'D' come from?

No, I didn't, but I will. 

Preserving the 'D' isn't important, only proper conversion of the string
to float.  The data was created by an atmosphere modeling program called
AMOEBA that was written in FORTRAN.

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





More information about the NumPy-Discussion mailing list