I'm trying to add a matrix to an existing csv file. Following this link, I wrote the following code,
f_handle = file(outfile+'.x.betas','a')
np.savetxt(f_handle,dataPoint)
f_handle.close()
where I have imported numpy as np, i.e.
import numpy as np
But I get this error:
f_handle = file(outfile+'.x.betas','a')
TypeError: 'str' object is not callable
I can't figure out what the problem seems to be. Please help :)