[SciPy-User] Brentq return values
Mon Aug 6 16:28:23 CDT 2012
On Mon, Aug 6, 2012 at 5:07 AM, The Helmbolds <email@example.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:
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).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User