Tips (Utility, Computer Language, and etc.)

[python] savetxt (numpty에 있는 함수로 list를 text로 저장할 때 사용가능)

Struggler J. 2018. 11. 3. 00:53

https://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html

https://stackoverflow.com/questions/3685265/how-to-write-a-multidimensional-array-to-a-text-file


np.savetxt(path, array, output format)


For example, 

np.savetxt("file.txt", res, fmt="%.6f")

저작자표시 비영리 변경금지 (새창열림)