[SciPy-User] scipy.interpolate.interp2d

VanWieren, Peter AVL/US Peter.VanWieren at avl.com
Tue Nov 4 12:23:06 EST 2014


A simple interpolation with a 6 data points is successful.

Python 2.6.6 (r266:84292, May 27 2013, 05:35:12)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy.interpolate
>>> x = [0,1,2]
>>> y = [0,3]
>>> z = [[1,2,3],[4,5,6]]
>>> s = scipy.interpolate.interp2d( x , y , z )

Increasing to 8 points with simple values creates a warning, even if kind='linear' is given.

>>> x = [0,1,2,3]
>>> y = [0,3]
>>> z = [[1,2,3,4],[5,6,7,8]]
>>> s = scipy.interpolate.interp2d( x , y , z )
Warning:     No more knots can be added because the number of B-spline coefficients
    already exceeds the number of data points m. Probably causes: either
    s or m too small. (fp>s)
        kx,ky=1,1 nx,ny=5,5 m=8 fp=0.000000 s=0.000000
>>>

These are simple and valid inputs which should not, as far as I can see, cause any problems.  Why does this warning occur, and how can it be avoided?

Thanks
PVW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20141104/22712ea6/attachment.html>


More information about the SciPy-User mailing list