How can I make this piece of code even faster?

pablobarhamalzas at pablobarhamalzas at
Sun Jul 21 12:19:24 CEST 2013

Thank's for all the replies! I've tried some of the imporovements you suggested (using math.exp() and sum() or math.fsum()). 
None of that made the code faster, because they are functions you are calling lots of times, and function calling is quite time expensive (same as x**(1/2) is faster than math.sqrt(x)).

I'm going to try to convert tu numpy now (I have no idea how to do it at the moment), thank's again to everyone.

More information about the Python-list mailing list