pylab, integral of sinc function
Paul Rubin
http
Mon Feb 19 21:53:12 EST 2007
Schüle Daniel <uval at rz.uni-karlsruhe.de> writes:
> > return dx * sum(map(func, arange(a,b,dx)))
> yes, this should be faster :)
You should actually use itertools.imap instead of map, to avoid
creating a big intermediate list. However I was mainly concerned that
the original version might be incorrect. I don't use pylab and don't
know what happens if you pass the output of arange to a function.
I only guessed at what arange does.
More information about the Python-list
mailing list