Write lines longer than 80 chars in output file [Python] Write lines longer than 80 chars in output file [Python] numpy numpy

Write lines longer than 80 chars in output file [Python]


You can use numpy.savetxt() to save an array to a text file while controlling the formatting. To print it to the screen, you have different options to control the linewidth. One would be to call

numpy.set_printoptions(linewidth=200)

to set the linewidth to a higher value.