I am writing a text file with some of the data I analyzed using python. I am running into some error messages. Below is my code.
sixteen=0.1
fifteen=0.3
fourteen=-.4
fourteen_revised=1
thirteen=2
with open('TMV_AVD.txt','w') as f:
f. write('16+',sixteen+'\n','15+', fifteen+'\n','14+',\
fourteen+'\n','14-',fourteen_revised+'\n', '13-', thirteen)
What I want in my text file is the following
16+,0.1
15+,0.3
14+,-.4
14-,1
13-,2
The error message I get is the following.
ufunc 'add' did not contain a loop with signature matching types dtype('<U32') dtype('<U32') dtype('<U32').
I thought I understood with open
function. Your suggestions will be greatly appreciated. Any suggestions?