The RectBivariateSpline
is used with for a 3D-spline where the Z coordinate is given as a 2D array, with each element [i,j]
corresponding to the positions x[i]
and y[j]
.
In your case it looks more that you have 3 X 2D-splines, which you can compute using:
import scipy
from scipy.interpolate import spline
xnew = scipy.linspace(0, 10, 1000)
ys1 = spline(xs, ys1, xnew, order=3)
ys2 = spline(xs, ys2, xnew, order=3)
ys3 = spline(xs, ys3, xnew, order=3)
If you want to take an average spline (like clarified in your comments):
ys = np.vstack((ys1,ys2,ys3)).mean(axis=0)