[SciPy-User] Spline interpolation array instead of loop?
Charles R Harris
Fri Mar 1 21:07:46 CST 2013
On Fri, Mar 1, 2013 at 5:18 PM, Michael Aye <firstname.lastname@example.org> wrote:
> So, I have to do the same spine interpolation (same=same x-axis) for
> 189 data channels, so I was wonderding if there is a way to store the
> 189 measurements into a 2D array and to set that at once to an
> interpolator, is that possible somehow?
> I noticed that InterpolatedUnivariateSpline does not allow me to do
> that, it seems.
> So, in other words, what I would like to be able to do is:
> len(x) = 20
> len(y_i) = 20
> i = 1 ..189
> y.shape == (20,189)
> s = UnivariateSpline(x, y)
> res = s(new_x)
> res.shape == (20, 189)
> Does something like that exist?
Well, I'm working on an spline interpolater for scipy and it works with
vector valued splines, so that should cover your case. At the moment it is
in pure python prototype form, so pretty slow. You might have a look if you
are interested and see if it is in the right direction. It is
Not much documented at the moment since I've only started on it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User