We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opened by Bas Nijholt (@basnijholt) at 2018-09-13T14:18:58.918Z
def f(x): return [x, -x] learner = adaptive.Learner1D(f, bounds=(-1, 1)) adaptive.runner.simple(learner, goal=lambda l: l.npoints > 200)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-10-e4aced43ce7b> in <module>() 3 4 learner = adaptive.Learner1D(f, bounds=(-1, 1)) ----> 5 adaptive.runner.simple(learner, goal=lambda l: l.npoints > 200) ~/Sync/Work/adaptive/adaptive/runner.py in simple(learner, goal) 458 for x in xs: 459 y = learner.function(x) --> 460 learner.tell(x, y) 461 462 ~/Sync/Work/adaptive/adaptive/learner/learner1D.py in tell(self, x, y) 237 238 # Update the scale --> 239 self.update_scale(x, y) 240 241 # Update the losses ~/Sync/Work/adaptive/adaptive/learner/learner1D.py in update_scale(self, x, y) 207 y_min = y_max = y 208 self._bbox[1] = [y_min, y_max] --> 209 self._scale[1] = np.max(y_max - y_min) 210 else: 211 self._bbox[1][0] = min(self._bbox[1][0], y) TypeError: unsupported operand type(s) for -: 'list' and 'list'
The text was updated successfully, but these errors were encountered:
originally posted by Jorn Hoofwijk (@Jorn) at 2018-09-15T11:44:24.068Z on GitLab
I suppose we convert the list to a np.array, maybe even typed (so set dtype=float64)
Sorry, something went wrong.
No branches or pull requests
(original issue on GitLab)
opened by Bas Nijholt (@basnijholt) at 2018-09-13T14:18:58.918Z
The text was updated successfully, but these errors were encountered: