Browse code

remove some part of the code that did something with interpolated points

Jorn Hoofwijk authored on 27/04/2018 19:19:08
Showing 1 changed files
... ...
@@ -227,35 +227,14 @@ class Learner1D(BaseLearner):
227 227
         real = y is not None
228 228
 
229 229
         if real:
230
-            # Add point to the real data dict and pop from the unfinished
231
-            # data_interp dict.
230
+            # Add point to the real data dict
232 231
             self.data[x] = y
233
-            self.data_interp.pop(x, None)
234 232
 
235 233
             if self._vdim is None:
236 234
                 try:
237 235
                     self._vdim = len(np.squeeze(y))
238 236
                 except TypeError:
239 237
                     self._vdim = 1
240
-
241
-            # Invalidate interpolated neighbors of new point
242
-            i = self.data.bisect_left(x)
243
-            if i == 0:
244
-                x_left = self.data.iloc[0]
245
-                for _x in self.data_interp:
246
-                    if _x < x_left:
247
-                        self.data_interp[_x] = None
248
-            elif i == len(self.data):
249
-                x_right = self.data.iloc[-1]
250
-                for _x in self.data_interp:
251
-                    if _x > x_right:
252
-                        self.data_interp[_x] = None
253
-            else:
254
-                x_left, x_right = self.data.iloc[i-1], self.data.iloc[i]
255
-                for _x in self.data_interp:
256
-                    if x_left < _x < x_right:
257
-                        self.data_interp[_x] = None
258
-
259 238
         else:
260 239
             # The keys of data_interp are the unknown points
261 240
             self.data_interp[x] = None