I tried the following: Am_cor=np.vectorize(Am_cor)
#plt.plot(t, signal, color='blue', label='Original signal') fig=plt.figure() plt.xlabel('Time(minute)') plt.ylabel('$ Re(<E1.E2>)$') plt.xlim([t[0], t[-1]]) plt.ylim((-.3*a1-a1,a1+.3*a1)) plt.grid() plt.plot(t,Am_cor(t),'o-',label='with parallax', markersize=2) plt.legend(loc="best") plt.show() f = open("Amp_cor_with_parallax(sd=.001)Ilamda=5.txt", "w") f.write("# time(minute) \t Amp_cor_with_parallax(sd=.001) \n") # column names np.savetxt(f, np.array([t, Am_cor(t)]).T) f.close() now the error which I am getting is 166 else: 167 filename = fname --> 168 exec compile(scripttext, filename, 'exec') in glob, loc 169 else: 170 def execfile(fname, *where): C:\Users\as\desktop\24_04_13\testing23_04.py in <module>() 191 f = open("Amp_cor_with_parallax(sd=.001)Ilamda=5.txt", "w") 192 f.write("# time(minute) \t Amp_cor_with_parallax(sd=.001) \n") # column names --> 193 np.savetxt(f, np.array([t, Am_cor(t)]).T) 194 f.close() 195 error: First argument must be a callable function.
-- http://mail.python.org/mailman/listinfo/python-list