Use numpy.ndarray.sum() vs. __builtin__.sum() to compute hist bin counts.
authorW. Trevor King <wking@drexel.edu>
Fri, 29 Oct 2010 19:19:31 +0000 (15:19 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 29 Oct 2010 19:19:31 +0000 (15:19 -0400)
commit8bb96b14de3e4a8da0bbb3c378f84f601e9e87e6
treea4c52503e4593ffb40690330509ee70498272df7
parentd41dc6d2bfd30fd8eb4f0ed2116f719b7b78250c
Use numpy.ndarray.sum() vs. __builtin__.sum() to compute hist bin counts.

It's much faster:
  $ time python -c 'import numpy; sum(numpy.arange(int(1e6)))'
  real    0m3.312s
  user    0m3.188s
  sys     0m0.118s
  $ time python -c 'import numpy; numpy.arange(int(1e6)).sum()'
  real    0m0.878s
  user    0m0.753s
  sys     0m0.122s
pysawsim/histogram.py