-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
ENH: optimize.root_scalar: allow newton without f', secant without x1 #17691
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
Conversation
No test failed (because of this PR) after the second commit, and the last commit made a minor tweak to the documentation, so I skipped CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andyfaff looks like this might merge, but still let us know if there's an issue. There's plenty of time to change it before the next release. |
Merging tomorrow. |
Since scipygh-17691, it is no longer required to provide x1. Document this. [docs only]
* DOC: Mark x1 as optional for secant root finding Since gh-17691, it is no longer required to provide x1. Document this. [docs only] --------- Co-authored-by: Lucas Colley <[email protected]>
Reference issue
Closes gh-17570
What does this implement/fix?
root_scalar
does not allowmethod='newton'
to be used without an analytical derivative even thoughscipy.optimize.root
does, and it does not allowmethod='secant'
to be used without an explicitx1
even thoughscipy.optimize.newton
does. This PR removesroot_scalar
's restrictions on use of these methods and updates the defaults method resolution accordingly.Additional information
I don't think there are any BC concerns because it is documented that
