scipy: MAINT: optimize.shgo: returns incorrect solution to Rosenbrock problem

My issue is about optimize.shgo. It gives an unexpected TypeError.

When running the following

from scipy.optimize import rosen, rosen_der, rosen_hess
bounds = [(0,1.6), (0, 1.6), (0, 1.4), (0, 1.4), (0, 1.4)]
result = scipy.optimize.shgo(rosen, bounds, options={'jac':rosen_der,'hess':rosen_hess})

I get

TypeError: _minimize_slsqp() got multiple values for argument 'jac'

I believe that jac is correctly specified here (see this documentation). Did I make a mistake or is there a bug here?

Scipy/Numpy/Python version information:

1.6.0 1.20.0 sys.version_info(major=3, minor=8, micro=5, releaselevel='final', serial=0)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@Stefan-Endres I believe this was a duplicate of gh-12963 (different from above). This appears to have been fixed by gh-17140.