integrate does not work anymore

Doerte doerte.apelt at gmx.de
Wed Mar 25 10:00:46 EDT 2009


Hello,

some time ago I implemented a Python script, which uses integrate.quad
(...). This was done with Python 2.4 / Win2000.

I'm working with Python 2.5 now, and installed Numpy, Scipy and
Matplotlib. My script and also the test described below do not work
anymore:

from pylab import *
from numpy import *
from scipy import *
from math import *

m = 5
n = 3
f = lambda x:m*x+n
x0 = 2.0
x1 = 6.5
res = integrate.quad(func=f, a=x0, b=x1)

> Traceback (most recent call last):
  File "<pyshell#15>", line 1, in <module>
    res = integrate.quad(func=f, a=x0, b=x1)
NameError: name 'integrate' is not defined


What's wrong here?

Regards,

Doerte



More information about the Python-list mailing list