Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6148b7

Browse files
committed
Merge pull request #507 from mdboom/doc_build_fail
Doc build fail
2 parents 7dda386 + f6194f8 commit b6148b7

File tree

4 files changed

+19
-23
lines changed

4 files changed

+19
-23
lines changed

doc/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def html():
138138
options = "-D plot_formats=\"[('png', 80)]\""
139139
else:
140140
options = ''
141-
if os.system('sphinx-build %s -P -b html -d build/doctrees . build/html' % options):
141+
if os.system('sphinx-build %s -b html -d build/doctrees . build/html' % options):
142142
raise SystemExit("Building HTML failed.")
143143

144144
figures_dest_path = 'build/html/pyplots'

doc/sphinxext/gen_gallery.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,10 @@ def gen_gallery(app, doctree):
105105
fh.write(content)
106106
fh.close()
107107

108-
try:
109-
import multiprocessing
110-
app.builder.info("generating thumbnails... ", nonl=True)
111-
pool = multiprocessing.Pool()
112-
pool.map(make_thumbnail, thumbnails.iteritems())
113-
pool.close()
114-
pool.join()
115-
app.builder.info("done")
116-
117-
except ImportError:
118-
for key in app.builder.status_iterator(
119-
thumbnails.iterkeys(), "generating thumbnails... ",
120-
length=len(thumbnails)):
121-
image.thumbnail(key, thumbnails[key], 0.3)
108+
for key in app.builder.status_iterator(
109+
thumbnails.iterkeys(), "generating thumbnails... ",
110+
length=len(thumbnails)):
111+
image.thumbnail(key, thumbnails[key], 0.3)
122112

123113
def setup(app):
124114
app.connect('env-updated', gen_gallery)

lib/matplotlib/lines.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,26 +387,26 @@ def recache(self, always=False):
387387
if always or self._invalidx:
388388
xconv = self.convert_xunits(self._xorig)
389389
if ma.isMaskedArray(self._xorig):
390-
x = ma.asarray(xconv, float)
390+
x = ma.asarray(xconv, np.float_)
391391
else:
392-
x = np.asarray(xconv, float)
392+
x = np.asarray(xconv, np.float_)
393393
x = x.ravel()
394394
else:
395395
x = self._x
396396
if always or self._invalidy:
397397
yconv = self.convert_yunits(self._yorig)
398398
if ma.isMaskedArray(self._yorig):
399-
y = ma.asarray(yconv, float)
399+
y = ma.asarray(yconv, np.float_)
400400
else:
401-
y = np.asarray(yconv, float)
401+
y = np.asarray(yconv, np.float_)
402402
y = y.ravel()
403403
else:
404404
y = self._y
405405

406406
if len(x)==1 and len(y)>1:
407-
x = x * np.ones(y.shape, float)
407+
x = x * np.ones(y.shape, np.float_)
408408
if len(y)==1 and len(x)>1:
409-
y = y * np.ones(x.shape, float)
409+
y = y * np.ones(x.shape, np.float_)
410410

411411
if len(x) != len(y):
412412
raise RuntimeError('xdata and ydata must be the same length')
@@ -746,7 +746,7 @@ def set_marker(self, marker):
746746
%(MarkerAccepts)s
747747
"""
748748
self._marker.set_marker(marker)
749-
749+
750750
def set_markeredgecolor(self, ec):
751751
"""
752752
Set the marker edge color

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,10 @@ def render_figures(code, code_path, output_dir, output_base, context,
498498
# -- Parse format list
499499
default_dpi = {'png': 80, 'hires.png': 200, 'pdf': 200}
500500
formats = []
501-
for fmt in config.plot_formats:
501+
plot_formats = config.plot_formats
502+
if isinstance(plot_formats, (str, unicode)):
503+
plot_formats = eval(plot_formats)
504+
for fmt in plot_formats:
502505
if isinstance(fmt, str):
503506
formats.append((fmt, default_dpi.get(fmt, 80)))
504507
elif type(fmt) in (tuple, list) and len(fmt)==2:
@@ -584,6 +587,9 @@ def render_figures(code, code_path, output_dir, output_base, context,
584587

585588
results.append((code_piece, images))
586589

590+
if not context:
591+
clear_state(config.plot_rcparams)
592+
587593
return results
588594

589595
def run(arguments, content, options, state_machine, state, lineno):

0 commit comments

Comments
 (0)