Skip to content
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

DOC: Fix the doc of root_finding.py to display nicely #431

Merged
merged 1 commit into from
Sep 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions quantecon/optimize/root_finding.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ def newton(func, x0, fprime, args=(), tol=1.48e-8, maxiter=50,
Returns
-------
results : namedtuple
root - Estimated location where function is zero.
function_calls - Number of times the function was called.
iterations - Number of iterations needed to find the root.
converged - True if the routine converged
A namedtuple containing the following items:
::

root - Estimated location where function is zero.
function_calls - Number of times the function was called.
iterations - Number of iterations needed to find the root.
converged - True if the routine converged

"""

if tol <= 0:
Expand Down Expand Up @@ -137,10 +141,13 @@ def newton_halley(func, x0, fprime, fprime2, args=(), tol=1.48e-8,
Returns
-------
results : namedtuple
root - Estimated location where function is zero.
function_calls - Number of times the function was called.
iterations - Number of iterations needed to find the root.
converged - True if the routine converged
A namedtuple containing the following items:
::

root - Estimated location where function is zero.
function_calls - Number of times the function was called.
iterations - Number of iterations needed to find the root.
converged - True if the routine converged
"""

if tol <= 0:
Expand Down Expand Up @@ -216,10 +223,13 @@ def newton_secant(func, x0, args=(), tol=1.48e-8, maxiter=50,
Returns
-------
results : namedtuple
root - Estimated location where function is zero.
function_calls - Number of times the function was called.
iterations - Number of iterations needed to find the root.
converged - True if the routine converged
A namedtuple containing the following items:
::

root - Estimated location where function is zero.
function_calls - Number of times the function was called.
iterations - Number of iterations needed to find the root.
converged - True if the routine converged
"""

if tol <= 0:
Expand Down