From 5928e7a5e77ae8b5f29d2255421f1352f22e4caa Mon Sep 17 00:00:00 2001 From: Daisuke Oyama Date: Mon, 24 Jun 2019 10:29:34 +0900 Subject: [PATCH 1/2] FIX: DOC: Remove `matplotlib.sphinxext.only_directives` --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index fc867de7d..f846a0e3f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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, @@ -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', ] From a520e73d87f8e5bb130d2079af2e0165f269348e Mon Sep 17 00:00:00 2001 From: Daisuke Oyama Date: Mon, 24 Jun 2019 10:30:16 +0900 Subject: [PATCH 2/2] FIX: DOC: Fix Examples section in `brent_max` --- quantecon/optimize/scalar_maximization.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/quantecon/optimize/scalar_maximization.py b/quantecon/optimize/scalar_maximization.py index 7b07099fd..0b398b1fc 100644 --- a/quantecon/optimize/scalar_maximization.py +++ b/quantecon/optimize/scalar_maximization.py @@ -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):