2016-04-10 20 views

回答

1

假設你有兩個數組x和y,那麼你可以把它們寫入到一個文件output.dat有:

import numpy as np 
x = np.random.rand(100) 
y = np.random.rand(100) 

np.savetxt('output.dat', zip(x,y), fmt=['%.3f','%.3f']) 

您可能需要更改格式。

+0

完美答案! – Tang

相關問題