diff --git a/src/components/course/cubic_spline_course/cubic_spline_2d.py b/src/components/course/cubic_spline_course/cubic_spline_2d.py index abdbc16..bf56788 100644 --- a/src/components/course/cubic_spline_course/cubic_spline_2d.py +++ b/src/components/course/cubic_spline_course/cubic_spline_2d.py @@ -18,6 +18,8 @@ class CubicSpline2D: def __init__(self, x_points, y_points): self.dists = self._calculate_distance_from_start(x_points, y_points) + self.sx = CubicSpline(self.dists, x_points) + self.sy = CubicSpline(self.dists, y_points) def _calculate_distance_from_start(self, x_points, y_points): dx = np.diff(x_points)