I\'m trying to append array b and c to file.txt. The default behavior is to overwrite and I cant find any documentation on changing this.
import numpy as np
Use open() with the 'append' mode, and pass the stream to the savetxt method:
savetxt
with open("test.txt", "ab") as f: numpy.savetxt(f, a)
Edit: To add a new line, or whatever:
with open("test.txt", "ab") as f: f.write(b"\n") numpy.savetxt(f, a)