integrate does not work anymore

Doerte doerte.apelt at
Wed Mar 25 15:00:46 CET 2009


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

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?



More information about the Python-list mailing list