loadtxtDon't round a number. What you see is the way NumPy chooses to print an array:
In [80]: import numpy as np
In [81]: x = np.loadtxt('test.dat', dtype = np.float64)
In [82]: print(x)
-37.9
The actual value is np.float64 closest to the value entered.
In [83]: x
Out[83]: array(-37.9000000000005)
Or, in the more likely case, if you have a higher dimensional array,
In [2]: x = np.loadtxt('test.dat', dtype = np.float64)
If reprof xlooks truncated:
In [3]: x
Out[3]: array([-37.9, -37.9])
np.set_printoptions :
In [4]: np.get_printoptions()
Out[4]:
{'edgeitems': 3,
'infstr': 'inf',
'linewidth': 75,
'nanstr': 'nan',
'precision': 8,
'suppress': False,
'threshold': 1000}
In [5]: np.set_printoptions(precision = 17)
In [6]: x
Out[6]: array([-37.90000000000050306, -37.90000000000050306])
( @mgilson .)