When the brentq routine is called with `full_output` set to `True` it returns a tuple. The first element of that tuple is the root, i.e., a simple real number. So far, so good. However, the second element of that tuple is: <scipy.optimize.zeros.RootResults object at 0x03B4F450> I don't know how to read or "decode" such a thing. I'd welcome any instruction on how to do that. I also observe that perhaps the return value could be more transparent, i.e., easy to interpret.
On Mon, Aug 6, 2012 at 5:07 AM, The Helmbolds <helmrp@yahoo.com> wrote:
When the brentq routine is called with `full_output` set to `True` it returns a tuple. The first element of that tuple is the root, i.e., a simple real number. So far, so good.
However, the second element of that tuple is: <scipy.optimize.zeros.RootResults object at 0x03B4F450> I don't know how to read or "decode" such a thing. I'd welcome any instruction on how to do that.
I also observe that perhaps the return value could be more transparent, i.e., easy to interpret.
The docstring says that (if we call the RootResults instance r) there's an attribute r.converged. Would be good to show in an example the rest: r.root r.iterations r.function_calls r.converged What those things are seems self-explanatory. You can find out things like the above by tab completion in IPython for example. Type r.<TAB> and you'll see what attributes and methods are present (alternatively, look at the source code). Ralf
participants (2)
-
Ralf Gommers -
The Helmbolds