0

In a recent project I have been dealing with numpy arrays. At first I make the array by simply giving start and end point and the stepsize. At a later instance, I need to call a single value from the array but the value of that was saved in the array and the value that the array retrieves are not the same.

I need and want both of the values in the output to be same. I have attached the screen shotso more clarity enter image description here

1 Answers1

0

use np.set_printoptions() to change the way the array is printed. The value is apparently correct, it's correct when you print it by index, it's just not being printed the way you want it to when you print the entire array.

https://numpy.org/doc/stable/reference/generated/numpy.set_printoptions.html

np.set_printoptions(precision=16) should work for you.

Ryan Laursen
  • 617
  • 4
  • 18