integrate does not work anymore
Ulrich Eckhardt
eckhardt at satorlaser.com
Wed Mar 25 10:19:54 EDT 2009
Doerte wrote:
> from pylab import *
> from numpy import *
> from scipy import *
> from math import *
Don't do this, read the style guide on writing Python code.
> res = integrate.quad(func=f, a=x0, b=x1)
[...]
> NameError: name 'integrate' is not defined
# try this instead
from scipy import integrate
Note that this is also mentioned on the scipy homepage in their script,
though they also commit the sin of namespace pollution by importing with
wildcards.
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
More information about the Python-list
mailing list