I am simply trying to put my 11-column, single row of values into a text file that I can append new rows to. I am used to python 2.7 and I do not understand why my np.savetxt is not behaving the same as previously.
I know that this will create my text file without having any type errors:
with open("testtext.txt", "wb") as myfile:
np.savetxt(myfile, mydata, fmt="%.5f", delimiter=' ', newline=' ')
However when I then run my code to receive my new data that I need to append, and I change it to:
with open("testtext.txt", "ab") as myfile:
np.savetxt(myfile, mynewdata, fmt="%.5f", delimiter=' ', newline=' ')
It does not put mynewdata into a new row. I have input \n into newline, I have tried " " instead of ' ', I have tried \r\n but that was a longshot.. Please help, I feel like this should be a simple thing. Thank you.