Cupitor
Cupitor

Reputation: 11657

Canopy error running SciPy documentation example

When I try to execute the following code from SciPy documentation in Canopy(Enthought Inc):

from scipy import integrate
import numpy as np
N = 5
def f(t, x):
    return np.exp(-x*t) / t**N
print integrate.nquad(f, [[1, np.inf],[0, np.inf]])

I get the following error:

      4 def f(t, x):
      5     return np.exp(-x*t) / t**N
----> 6 print integrate.nquad(f, [[1, np.inf],[0, np.inf]])

AttributeError: 'module' object has no attribute 'nquad'

Is the included SciPy package has a problem? Reinstalling the Canopy/Scipy didn't solve the problem.

Upvotes: 0

Views: 249

Answers (0)

Related Questions