[SciPy-User] SmoothBivariateSpline giving wrong result

Kevin Gullikson kevin.gullikson@gmail....
Mon Oct 15 22:19:06 CDT 2012

Hi all,

I am trying to do a 2d interpolation of unstructured data. To try to get a
feel for how the functions work, I tried a simple test case and it is not
working. See below:

In [24]: x = numpy.arange(10.)

In [25]: y = numpy.arange(10.)

In [26]: z = x**2 + y**2

In [27]: fcn = SmoothBivariateSpline(x,y,z, s=0, kx=1, ky=1)

In [28]: fcn(1,1)
Out[28]: array([[ 0.]])

In [29]: fcn(1,5)
Out[29]: array([[ 0.]])

What am I doing wrong? It seems like z should be a 2d array or something,
but the documentation explicitly says it is a 1d array.

Much thanks, and I look forward to feeling stupid!
Kevin Gullikson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20121015/a832b867/attachment.html 

More information about the SciPy-User mailing list