Skip to content

raise ValueError if dichotomy fails #273

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

Merged
merged 2 commits into from
Apr 21, 2025
Merged

Conversation

jmmshn
Copy link
Contributor

@jmmshn jmmshn commented Apr 18, 2025

Address this issue from solid_dmft
solid_dmft #100
dochotomy can fail sometime and will return None, but the result will be sent to chemical_potential which causes downstream errors.
Here, we raise an exception and let the user know how it might have failed.

@the-hampel
Copy link
Member

Thank you @jmmshn . This looks good to me. I just checked and the other two available methods newton and brenth from scipy will throw an exception if they failed by themselves. So we do not need to catch those.

@the-hampel the-hampel merged commit 92158ae into TRIQS:unstable Apr 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants