On Wed, Oct 18, 2017 at 7:30 PM, Nissim Derdiger <niss...@elspec-ltd.com> wrote: > 3. difference between values are: > [ 2.25699615e+02 5.51561475e-01 3.81394744e+00 1.03807904e-01] > Instead of: > [225.69961547851562, 0.5515614748001099, 3.8139474391937256, > 0.10380790382623672]
The behaviour you're describing sounds like a matter of pretty-printing. Numpy uses a shortened format for printing numeric values by default. When you convert to a list, you leave numpy behind and you get the native python behaviour. If you want to control how this pretty-printing happens in numpy, take a close look at numpy.set_printoptions: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.set_printoptions.html . Now, I still don't see how taking a trivial view of your array would affect this printing, but I believe your values themselves are identical (i.e. correct) in both cases, and they are only displayed differently. If you were to do further computations with your arrays, the results would be the same. Regards, AndrĂ¡s _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion