Skip to content
New issue

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

MAINT: optimize.dual_annealing: fix callable jac with args #17956

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Feb 10, 2023

Reference issue

Supersedes gh-13066
Closes gh-11052

What does this implement/fix?

gh-11052 reported that dual_annealing fails when jac is callable and args is specified. This PR fixes the bug.

Copy link
Member

@tupui tupui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Matt, fix LGTM. I was a unsure at first about the elif in terms of the logic but it's still understandable and a matter of pref I suppose.

@tupui tupui merged commit 5e3d467 into scipy:main Feb 10, 2023
@tupui tupui added this to the 1.11.0 milestone Feb 10, 2023
@mdhaber
Copy link
Contributor Author

mdhaber commented Feb 10, 2023

Thanks! I see now that it could be confusing. Want me to change it or add a comment?

@tupui
Copy link
Member

tupui commented Feb 10, 2023

It's fine I would say. After thinking about that I saw the argument about writing it like that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.optimize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

optimize.dual_annealing does not pass arguments to jacobian.
2 participants