I tested PyCharm and IDLE, both of them print the 7th number to a second line.
Input:
import numpy as np
a=np.array([ 1.02090721, 1.02763091, 1.038993
If you want a customized version of str(a)
, the answer is array_str:
>>> print(a)
[ 1.02090721 1.02763091 1.03899317 1.00630297 1.00127454 0.89916715
1.04486896]
>>> str(a)
'[1.02090721 1.02763091 1.03899317 1.00630297 1.00127454 0.89916715\n 1.04486896]'
>>> np.array_str(a, max_line_width=np.inf)
'[1.02090721 1.02763091 1.03899317 1.00630297 1.00127454 0.89916715 1.04486896]'
>>> print(np.array_str(a, max_line_width=np.inf)
[1.02090721 1.02763091 1.03899317 1.00630297 1.00127454 0.89916715 1.04486896]
If you want to change the printout of every array, not just here, see set_printoptions.