[SciPy-dev] Import problem in scipy.interpolate.lagrange

Rhys Ulerich rhys.ulerich@gmail....
Wed Mar 26 12:08:30 CDT 2008

Hi all,

scipy/interpolate/interpolate.py is missing an import for numpy.poly1d.

Python 2.5 (r25:51908, Nov  6 2007, 15:55:44)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> import scipy.interpolate
>>> scipy.interpolate.lagrange([0.0,1.0],[1.0,0.0])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
"/usr/lib64/python2.5/site-packages/scipy/interpolate/interpolate.py", line
30, in lagrange
    p = poly1d(0.0)
NameError: global name 'poly1d' is not defined

The problem still appears in svn trunk:
It can (I think) be fixed by adding 'poly1d' into the 'from numpy import...'
list.  It looks like the problem
has existed since changeset 3068.

How can I get a SciPy Trac login so I can file this ticket?

- Rhys
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-dev/attachments/20080326/467bfab1/attachment.html 

More information about the Scipy-dev mailing list