[...]

>> In [19]: def simple_integral(func,a,b,dx = 0.001):
>>     ....:     return sum(map(lambda x:dx*x, func(arange(a,b,dx))))
> 
> Do you mean
> 
>  def simple_integral(func,a,b,dx = 0.001):
>     return dx * sum(map(func, arange(a,b,dx)))
> 

yes, this should be faster :)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to