This is a very simple question but I don't know the right words to Google. I have a numpy array:
A = np.array([ 8.1588e-01, -3.9675e-04])
And I would like to print it as normal decimal numbers. That is 0.81588, -0.00039675
.
How can you do that?
Numpy let's you customize the output globally using set_printoptions
.
To get rid of scientific notation, you can use:
np.set_printoptions(suppress=True) # don't use scientific notation
From the documentation:
suppress : bool, optional
If True, always print floating point numbers using fixed point notation, in which case numbers equal to zero in the current precision will print as zero. If False, then scientific notation is used when absolute value of the smallest number is < 1e-4 or the ratio of the maximum absolute value to the minimum is > 1e3. The default is False.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With