[SciPy-dev] Import problem in scipy.interpolate.lagrange
Nils Wagner
nwagner@iam.uni-stuttgart...
Wed Mar 26 14:45:38 CDT 2008
On Wed, 26 Mar 2008 12:08:30 -0500
"Rhys Ulerich" <rhys.ulerich@gmail.com> wrote:
> 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>
> File
> "/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:
> http://svn.scipy.org/svn/scipy/trunk/scipy/interpolate/interpolate.py
> 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
See
http://www.scipy.org/BugReport
for details. BTW, I can confirm the bug
>>> 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 ?
File
"/usr/lib/python2.4/site-packages/scipy/interpolate/interpolate.py",
line 30, in lagrange
p = poly1d(0.0)
NameError: global name 'poly1d' is not defined
>>> scipy.__version__
'0.7.0.dev4050'
HTH,
Nils
More information about the Scipy-dev
mailing list