Why is this so much faster?

Keir Rice keirrice at gmail.com
Fri Jun 3 00:05:22 EDT 2011


Terry,

return math.sqrt(sum([h*i*i for i,h in enumerate(histogram)]) / self.Area())

Ran at the same speed as my 'fast' version and without the square brackets was slower.

Thanks,

Keir



More information about the Python-list mailing list