{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/3056","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/3056/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/3056/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/3056/events","html_url":"https://github.com/scipy/scipy/issues/3056","id":22490609,"number":3056,"title":"scipy.optimize.minimize SLSQP leads to out of bounds solution","user":{"login":"fmaxunc","id":5914450,"avatar_url":"https://avatars.githubusercontent.com/u/5914450?v=3","gravatar_id":"","url":"https://api.github.com/users/fmaxunc","html_url":"https://github.com/fmaxunc","followers_url":"https://api.github.com/users/fmaxunc/followers","following_url":"https://api.github.com/users/fmaxunc/following{/other_user}","gists_url":"https://api.github.com/users/fmaxunc/gists{/gist_id}","starred_url":"https://api.github.com/users/fmaxunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmaxunc/subscriptions","organizations_url":"https://api.github.com/users/fmaxunc/orgs","repos_url":"https://api.github.com/users/fmaxunc/repos","events_url":"https://api.github.com/users/fmaxunc/events{/privacy}","received_events_url":"https://api.github.com/users/fmaxunc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scipy/scipy/labels/defect","name":"defect","color":"e11d21"},{"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.optimize","name":"scipy.optimize","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2013-11-12T00:52:11Z","updated_at":"2016-04-02T20:31:50Z","closed_at":null,"body":"SLSQP algorithm goes to infinity without counting for bounds specified if local gradient in one of the directions is close to zero. This issue is found at 2D and 7D bounded constrained problems I'm running now. \r\n\r\nobjective function as:\r\ndef objective(x):\r\n    lambda _obj _x: (5.*x-2)**2*sin(12.*x-4)\r\n    return _obj(numpy.linalg.norm(x)\r\n\r\nbounds = ((-1,1),(-1,1))"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/204802021","html_url":"https://github.com/scipy/scipy/issues/3056#issuecomment-204802021","issue_url":"https://api.github.com/repos/scipy/scipy/issues/3056","id":204802021,"user":{"login":"pv","id":35046,"avatar_url":"https://avatars.githubusercontent.com/u/35046?v=3","gravatar_id":"","url":"https://api.github.com/users/pv","html_url":"https://github.com/pv","followers_url":"https://api.github.com/users/pv/followers","following_url":"https://api.github.com/users/pv/following{/other_user}","gists_url":"https://api.github.com/users/pv/gists{/gist_id}","starred_url":"https://api.github.com/users/pv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pv/subscriptions","organizations_url":"https://api.github.com/users/pv/orgs","repos_url":"https://api.github.com/users/pv/repos","events_url":"https://api.github.com/users/pv/events{/privacy}","received_events_url":"https://api.github.com/users/pv/received_events","type":"User","site_admin":false},"created_at":"2016-04-02T20:31:50Z","updated_at":"2016-04-02T20:31:50Z","body":"@cfcohen: this problem is due to the gradient numerical differentiation not respecting bounds\r\n@Marigold: that code works OK for me, stays within bounds."}}