I have an output of a Fortran program that sometimes writes in exponential notation without the E. I can't fix the program at this point and I have to deal with the output.
Basically I'm trying to read the ASCII output file with Numpy's loadtxt
function, but it fails when it encounters the number -0.1923856859-100
which is supposed to be written -0.1923856859E-100
.
Is there any way to either read that properly with Numpy, or to easily re-write that file converting every instance where that happens to a proper notation?