Saving arrays as columns with np.savetxt
Use numpy.c_[]
:
np.savetxt('myfile.txt', np.c_[x,y,z])
Use numpy.transpose()
:
np.savetxt('myfile.txt', np.transpose([x,y,z]))
I find this more intuitive than using np.c_[]
.
Use numpy.c_[]
:
np.savetxt('myfile.txt', np.c_[x,y,z])
Use numpy.transpose()
:
np.savetxt('myfile.txt', np.transpose([x,y,z]))
I find this more intuitive than using np.c_[]
.