Closed randomizedthinking closed 3 years ago
Hello,
X-values must strictly monotonically increase or decrease. In other cases we cannot solve the equations to compute the spline.
You need to remove duplicate values from your dataset. You can use numpy.unique function for example.
If you have multiple Y-values at the same X-value you need to use parametrization:
x = u(t); y = v(t)
where t
is strictly monotonically increase or decrease. See multivariate smoothing examples.
The current implementation cannot handle duplicated x values. In practice, it is common that we observe multiple y-values at the same x value.