I am getting "SyntaxError: can't assign to function call" for a code on DWT on a signal from a text file. I appreciate if anyone can explain why is this syntax error.
import numpy as np
import pywt
import array
array.array('i')
k = array.array('i',(0 for i in range(1,9))) #x = [0 for i in xrange()]
for x in k:
filename = ('F00%d.txt', x)
file = open(filename, mode + 'r')
text = file.read()
file.close()
cA1, cD1 = pywt.dwt(text,'db4')
cA2, cD2 = pywt.dwt(cD1,'db4')
cA3, cD3 = pywt.dwt(cD2,'db4')
cA4, cD4 = pywt.dwt(cD3,'db4')
cA5, cD5 = pywt.dwt(cD4,'db4')
m(k, 1) = np.mean(cD5)
s(k, 1) = np.std(cD5)
ma(k, 1) = max(cD5)
mi(k, 1) = min(cD5)
There are 9 files in a folder which I am reading one by one (columnise) and applying DWT and then computing some statistical parameters. Thank you in advance.