From 61883b72d4adccebd7282d7bcc9064a7a6a64083 Mon Sep 17 00:00:00 2001 From: "Matthew N. White" Date: Tue, 3 Sep 2024 16:05:22 -0400 Subject: [PATCH] Forgot to remove test code before comitting Deleting method I added to interpolation.py during debugging. --- HARK/interpolation.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/HARK/interpolation.py b/HARK/interpolation.py index 57da58eeb..d30fccd85 100644 --- a/HARK/interpolation.py +++ b/HARK/interpolation.py @@ -2718,37 +2718,6 @@ def _evaluate(self, x, y): ) + alpha * self.xInterpolators[i](x[c]) return f - def _secret(self, x, y): - """ - IT'S A SECRET TO EVERYBODY - """ - if _isscalar(x): - y_pos = max(min(np.searchsorted(self.y_list, y), self.y_n - 1), 1) - alpha = (y - self.y_list[y_pos - 1]) / ( - self.y_list[y_pos] - self.y_list[y_pos - 1] - ) - f = (1 - alpha) * self.xInterpolators[y_pos - 1]( - x - ) + alpha * self.xInterpolators[y_pos](x) - else: - m = len(x) - y_pos = np.searchsorted(self.y_list, y) - y_pos[y_pos > self.y_n - 1] = self.y_n - 1 - y_pos[y_pos < 1] = 1 - f = np.zeros(m) + np.nan - if y.size > 0: - for i in range(1, self.y_n): - c = y_pos == i - if np.any(c): - alpha = (y[c] - self.y_list[i - 1]) / ( - self.y_list[i] - self.y_list[i - 1] - ) - # f[c] = i - f[c] = self.xInterpolators[i](x[c]) - # f[c] = self.xInterpolators[i - 1](x[c]) - # f[c] = self.xInterpolators[i](x[c]) - self.xInterpolators[i - 1](x[c]) - return f - def _derX(self, x, y): """ Returns the derivative with respect to x of the interpolated function