How can I use numpy.savetxt to output text file in another directory?
the current working directory is /home/user/current/, but I want to save the txt file into /home/user/test/. How to modify the following code?Thanks.
out_name = "/home/user/test/txtfile.txt"
numpy.savetxt(out_name,output,fmt = '%d \r %d \r %.3f \r\n')
Assuming
fmtis compatible withoutput, your code should save data toout_name.Is it not working? If so, what was the full traceback error message?