I am using savetxt to save numpy array called 'newresult' to a file.
np.savetxt("test.csv", newresult, delimiter=",")
the 'newresult' numpy array is inside a loop, so at each loop the content of newresult changes. I want to add the new content to test.csv file.
But at each loop the
np.savetxt("test.csv", newresult, delimiter=",")
is overwriting the content of the test.csv, while I want to add to the existing content.
for example,
loop 1:
newresult=
[[ 1 2 3 ]
[ 12 13 14]]
loop 2
newresult=
[[ 4 6 8 ]
[ 19 14 15]]
test.csv content is:
1, 2 ,3
12,13,14
4,6,8
19,14,15