Skip to content
Snippets Groups Projects
Commit 1569fecf authored by Bas Nijholt's avatar Bas Nijholt
Browse files

2D: add comment explaining why the interpolator can't return exact zeros

parent 94fffdcf
No related branches found
No related tags found
1 merge request!7implement 2D learner
......@@ -703,7 +703,9 @@ class Learner2D(BaseLearner):
ip_real = interpolate.LinearNDInterpolator(self.points_real,
self.values_real)
else:
# It is important not to return exact zeros
# It is important not to return exact zeros because
# otherwise the algo will try to add the same point
# to the stack each time.
ip_real = lambda x: np.empty(len(x))
n_interp = list(self._interp.values())
values = ip_real(p[n_interp])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment