Schüle Daniel <[EMAIL PROTECTED]> 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.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to