Skip to content

Commit 84774ed

Browse files
authored
Merge pull request #488 from QuantEcon/only_directives
FIX: DOC: Remove `matplotlib.sphinxext.only_directives`
2 parents 2438403 + a520e73 commit 84774ed

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def install(package):
3636
# def __getattr__(cls, name):
3737
# return Mock()
3838

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

4242
# If extensions (or modules to document with autodoc) are in another directory,
@@ -82,7 +82,7 @@ def install(package):
8282
# 'ipython_console_highlighting',
8383
'IPython.sphinxext.ipython_console_highlighting',
8484
'IPython.sphinxext.ipython_directive',
85-
'matplotlib.sphinxext.only_directives',
85+
# 'matplotlib.sphinxext.only_directives',
8686
'matplotlib.sphinxext.plot_directive',
8787
]
8888

quantecon/optimize/scalar_maximization.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,13 @@ def brent_max(func, a, b, args=(), xtol=1e-5, maxiter=500):
3737
attained. A value of 0 implies that the maximum was not hit.
3838
The value `num_iter` is the number of function calls.
3939
40-
Example
41-
-------
42-
43-
```
44-
@njit
45-
def f(x):
46-
return -(x + 2.0)**2 + 1.0
47-
48-
xf, fval, info = brent_max(f, -2, 2)
49-
```
40+
Examples
41+
--------
42+
>>> @njit
43+
... def f(x):
44+
... return -(x + 2.0)**2 + 1.0
45+
...
46+
>>> xf, fval, info = brent_max(f, -2, 2)
5047
5148
"""
5249
if not np.isfinite(a):

0 commit comments

Comments
 (0)