Open djbower opened 3 months ago
It's actually just that sucess is indicated with no message whatsoever! The messages are only used to indicate error states.
As an example of a solve failing, try running this (which is a problem that does not have a root):
import optimistix as optx
sol = optx.root_find(
lambda y, args: (1 + y**2), optx.Newton(rtol=1e-3, atol=1e-3), 1.0, throw=False
)
print(sol)
print("\n-----\n")
print(sol.result)
Hopefully this is trivial, but I'm having trouble accessing the success/not result of the solver:
Code snippet:
Output of print statements, note that nothing is returned for result = :
I was expecting to see "successful" printed as per https://docs.kidger.site/optimistix/api/solution/ (I know the returned result is correct because I have a test suite I am comparing against and the numerical value is correct). I can access a '0' integer if I instead access the
result._value
attribute, but so far no luck getting the string message. I suspect I am using enums incorrectly.