Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def install(package):
# def __getattr__(cls, name):
# return Mock()

# MOCK_MODULES = ['pandas', 'statsmodels', 'numba']
# MOCK_MODULES = ['pandas', 'statsmodels', 'numba']
# sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -82,7 +82,7 @@ def install(package):
# 'ipython_console_highlighting',
'IPython.sphinxext.ipython_console_highlighting',
'IPython.sphinxext.ipython_directive',
'matplotlib.sphinxext.only_directives',
# 'matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive',
]

Expand Down
17 changes: 7 additions & 10 deletions quantecon/optimize/scalar_maximization.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@ def brent_max(func, a, b, args=(), xtol=1e-5, maxiter=500):
attained. A value of 0 implies that the maximum was not hit.
The value `num_iter` is the number of function calls.

Example
-------

```
@njit
def f(x):
return -(x + 2.0)**2 + 1.0

xf, fval, info = brent_max(f, -2, 2)
```
Examples
--------
>>> @njit
... def f(x):
... return -(x + 2.0)**2 + 1.0
...
>>> xf, fval, info = brent_max(f, -2, 2)

"""
if not np.isfinite(a):
Expand Down