I have these two arrays being printed.
array([[-7.00e+00, -9.00e+00, 0.00e+00, 1.60e+01, 0.00e+00, -9.00e+00, -7.00e+00, -1.20e+01],
[-6.00e+00, -1.70e+01, 1.11e-15, 2.00e+01, 1.33e-15, -1.70e+01, -6.00e+00, 2.00e+00],
[-3.00e+00, -1.90e+01, 1.00e+01, 2.80e+01, 1.00e+01, -1.90e+01, -3.00e+00, 2.40e+01],
[ 6.00e+00, 0.00e+00, 1.40e+01, 1.60e+01, 1.40e+01, 1.78e-15, 6.00e+00, 2.40e+01],
[-3.00e+00, -1.90e+01, 1.00e+01, 2.80e+01, 1.00e+01, -1.90e+01, -3.00e+00, 2.40e+01],
[-6.00e+00, -1.70e+01, -1.11e-15, 2.00e+01, 4.44e-16, -1.70e+01, -6.00e+00, 2.00e+00],
[-7.00e+00, -9.00e+00, 0.00e+00, 1.60e+01, 8.88e-16, -9.00e+00, -7.00e+00, -1.20e+01],
[-1.40e+01, -2.20e+01, 6.00e+00, 3.20e+01, 6.00e+00, -2.20e+01, -1.40e+01, -4.00e+00]])
array([[ -9.96, -29.6 , -7.68, 47.32],
[-11.7 , -17.86, -10.47, 25.97],
[ 28.45, -22.42, -9.69, 46.16],
[ 42.94, -2.22, 11.06, 40.59]])
When logging their type, they are both float64. I wonder why one as scientific notation and not the other. Also, how to set it to always have the second notation.
I have this on the top of my script
np.set_printoptions(linewidth=240, precision=2)
But apparently it is not holding for all cases.
numpy?numpyarrays.type(out1)andtype(out2)returningnumpy.ndarraynumpyuses scientific notation when the range of values is wide. Display, for example, the first row which does not have anye-15values.