Skip to content

can't run examples #4

Description

@bwheelz36

With both the .py example and the note book example, I get the below error.
I'm using python 3.8, scipy version '1.5.2'

Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/brendan/Documents/temp/Bayesian-optimization-using-Gaussian-Process/modules/parallelstuff.py", line 35, in mworker
res = minimize(f, x0, args = fargs, **margs)
Process Process-5:
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 617, in minimize
return _minimize_lbfgsb(fun, x0, args, jac, bounds,
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/lbfgsb.py", line 306, in _minimize_lbfgsb
sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/optimize.py", line 261, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
Traceback (most recent call last):
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 95, in init
self._update_grad()
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 171, in _update_grad
self._update_grad_impl()
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 91, in update_grad
self.g = approx_derivative(fun_wrapped, self.x, f0=self.f,
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_numdiff.py", line 388, in approx_derivative
raise ValueError("f0 passed has more than 1 dimension.")
File "/home/brendan/Documents/temp/Bayesian-optimization-using-Gaussian-Process/modules/parallelstuff.py", line 35, in mworker
res = minimize(f, x0, args = fargs, **margs)
ValueError: f0 passed has more than 1 dimension.
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 617, in minimize
return _minimize_lbfgsb(fun, x0, args, jac, bounds,
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/lbfgsb.py", line 306, in _minimize_lbfgsb
sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/optimize.py", line 261, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 95, in init
self._update_grad()
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 171, in _update_grad
self._update_grad_impl()
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 91, in update_grad
self.g = approx_derivative(fun_wrapped, self.x, f0=self.f,
File "/home/brendan/python/PhaserVenv/lib/python3.8/site-packages/scipy/optimize/_numdiff.py", line 388, in approx_derivative
raise ValueError("f0 passed has more than 1 dimension.")
ValueError: f0 passed has more than 1 dimension.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions