0

I want to store my data in a .txt file by using the "write" function in python.

The problem is that my values are around 9 digits after the point and the "write" function truncates after only 6.

For exemple if I want to write 0.000000604 I will get into the txt file 0.000000

I didn't see any option to change this precision... Someone know how to deal with that?

Here is how I use it :

fres = open("results.dat","w")
fres.write("%f %f %f\n" % (abstime, np.mean(x), np.mean(y),0.00000005))
fres.close()
martineau
  • 119,623
  • 25
  • 170
  • 301
trial
  • 9
  • 1

0 Answers0