My goal is to convert my data into numpy array while preserving the number formats in the original list, clear and proper.
for example,
this is my data in list format:
[[24.589888563639835, 13.899891781550952, 4478597, -1], [26.822224204095697, 14.670531752529088, 4644503, -1], [51.450405486761866, 54.770422572665254, 5570870, 0], [44.979065080591504, 54.998835550128852, 6500333, 0], [44.866399274880663, 55.757240813761534, 6513301, 0], [45.535380533604247, 57.790074517001365, 6593281, 0], [44.850372630818214, 54.720574554485822, 6605483, 0], [51.32738085400576, 55.118344981379266, 6641841, 0]]
when i do convert it to numpy array,
data = np.asarray(data)
i get mathematical notation e
, how can I conserve the same format in my output array?
[[ 2.45898886e+01 1.38998918e+01 4.47859700e+06 -1.00000000e+00]
[ 2.68222242e+01 1.46705318e+01 4.64450300e+06 -1.00000000e+00]
[ 5.14504055e+01 5.47704226e+01 5.57087000e+06 0.00000000e+00]
[ 4.49790651e+01 5.49988356e+01 6.50033300e+06 0.00000000e+00]
[ 4.48663993e+01 5.57572408e+01 6.51330100e+06 0.00000000e+00]
[ 4.55353805e+01 5.77900745e+01 6.59328100e+06 0.00000000e+00]
[ 4.48503726e+01 5.47205746e+01 6.60548300e+06 0.00000000e+00]
[ 5.13273809e+01 5.51183450e+01 6.64184100e+06 0.00000000e+00]]
update:
I did :
np.set_printoptions(precision=6,suppress=True)
but I still get different numbers when I pass some part of data to another variable and then look inside it, and i see that the decimals have changed! Why is it internally changing the decimals, why can't it just hold them as it is?