[SciPy-User] Spline interpolation array instead of loop?
Charles R Harris
charlesr.harris at gmail.com
Fri Mar 1 22:15:25 EST 2013
On Fri, Mar 1, 2013 at 8:07 PM, Charles R Harris
<charlesr.harris at gmail.com>wrote:
>
>
> On Fri, Mar 1, 2013 at 5:18 PM, Michael Aye <michael.aye at ucla.edu> wrote:
>
>> Hi!
>>
>> 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 here<https://github.com/charris/bsplines>.
> Not much documented at the moment since I've only started on it.
>
>
If you do try it out, and it would be a favor to me if you did ;), feel
free to email me directly if you need help setting it up.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130301/38fb834c/attachment.html>
More information about the SciPy-User
mailing list