# [SciPy-user] question splines

dmitrey openopt@ukr....
Tue Jun 19 03:56:36 CDT 2007

```hi all,
I need a func from scipy or other Python free software that provides
quickly 1-variable interpolation of some funcs (I mean vectoriezed form)
by 2nd-order splines.
for example, I have
(x from R)
func1(x) = sin(x)
func2(x) = cos(x)
func3(x) = x^2 + x + 2*atan(x)
(the number of the funcs may be very great, up to ~ 1000)

So I have several points x = 0.1, 0.2, 0.3, 0.4 and I want to obtain
func1(x), func2(x), func3(x) values from any point within the [0.1; 0.4]
region.
Also, it would be very nice if
1) the interpolation function would provide a value outside the region,
interpolated by linear or quadratic or any other way;
2) I have possibility to do binary insert of new points.
I.e., initially I have values of func1, func2, func3 in x=0.1 and x=0.3.
Then I got values in x=0.4. Then - in x = 0.2, etc, etc . I know that
sorted x-arrays allow to obtain interpolated values more quickly, like
interp1() vs interp() in MATLAB. Can I somewhow take advantages in my case?

Dmitrey.
```