[SciPy-user] interp1d problem

Pauli Virtanen pav@iki...
Mon Nov 3 09:30:44 CST 2008


Mon, 03 Nov 2008 15:00:05 +0000, Ben Webber wrote:
> In CDAT I have been trying to use the interp1d class from the
> scipy.interpolate package to interpolate 3-dimensional oceanographic
> data along the time axis using cubic splines. This works fine for 1 or 2
> dimensional data but fails for 3 dimensional data. However, using linear
> interpolation works no matter what the dimensions.
> "/cvos/apps/CDAT-5.0.b1/lib/python2.5/site-packages/scipy/interpolate/
> line 431, in _find_smoothest
>     return dot(tmp, yk)
> ValueError: objects are not aligned

I believe this bug was fixed in r4489 [1] and spline interpolation should
work in the upcoming Scipy 0.7.0. (In the meantime, you can try to use
a development version of Scipy, or apply the patch linked.)

.. [1] http://scipy.org/scipy/scipy/changeset?format=diff&new=4489&old=4175&new_path=trunk%2Fscipy%2Finterpolate%2Finterpolate.py&old_path=trunk%2Fscipy%2Finterpolate%2Finterpolate.py

Pauli Virtanen

More information about the SciPy-user mailing list