This is the portion of the code where i am getting this error. Can you suggest a solution for this problem
f_TP = open("./result_analyze/BGRU/TP_filenames.txt","ab+")
for i in range(len(str(result[1]))):
TP_index = result[i]
f_TP.write(str(filenames[TP_index])+'\n')
The error is :
Traceback (most recent call last):
File "bgru.py", line 240, in <module>
main(traindataSetPath, testdataSetPath, realtestdataSetPath, weightPath, resultPath, batchSize, maxLen, vectorDim, layers, dropout)
File "bgru.py", line 154, in main
f_TP.write((filenames[TP_index])+'\n')
TypeError: list indices must be integers, not numpy.float64