1 | initial version |
I could boil it down to
def nonneg(a):
if a<0.01:
return 0.01
for i in range(len(data2)):
if bool(min(testfct(data2[i][0],best_fit_par[tau]+dx),testfct(data2[i][0],nonneg(best_fit_par[tau]-dx)))<data2[i][1]) and bool(data2[i][1]<max(testfct(data2[i][0],best_fit_par[tau]+dx),testfct(data2[i][0],nonneg(best_fit_par[tau]-dx)))) != 1:
print 1
where testfct is a function of two variables and data2 is a list of 2-tuples and the rest are predefined parameters. The problem lies within the nonneg fct. If I do not use in within the testfct, everything works fine.