From 06fa307e84c027c0e50808e9457c148b2a5940c2 Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Tue, 17 Sep 2013 17:18:29 -0400 Subject: [PATCH] * spline_2d: Use public scipy API functions. --- math/spline_2d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/math/spline_2d.py b/math/spline_2d.py index 431ed66..21dbc4e 100644 --- a/math/spline_2d.py +++ b/math/spline_2d.py @@ -43,14 +43,14 @@ class spline_2d: calling the first spline function if you want different, non-default parameters.""" self.spline_params \ - = scipy.interpolate.splmake(self.x.copy(), self.y) + = scipy.interpolate.splrep(self.x, self.y, s=0) def spline(self, xnew): try: params = self.spline_params except: self.init_spline_params() - return scipy.interpolate.spleval(self.spline_params, xnew) + return scipy.interpolate.splev(x=xnew, tck=self.spline_params, der=0)