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

后端 未结 1 1798
南笙
南笙 2021-01-11 17:14

I\'ve got a pretty basic question. I\'m using Python to calculate an n×12 vector

y = numpy.array([V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12])

相关标签:
1条回答
  • 2021-01-11 17:26

    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.

    0 讨论(0)
提交回复
热议问题