Note
Click here to download the full example code
Error during scraping¶
The error is actually introduced by the resetter in conf.py
. It mocks
a “zero-size reduction” error in fig.savefig
.
Traceback (most recent call last):
File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/scrapers.py", line 335, in save_figures
rst = scraper(block, block_vars, gallery_conf)
File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/tests/tinybuild/conf.py", line 17, in __call__
return matplotlib_scraper(block, block_vars, gallery_conf, **kwargs)
File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/scrapers.py", line 151, in matplotlib_scraper
fig.savefig(image_path, **these_kwargs)
File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/tests/tinybuild/conf.py", line 43, in <lambda>
Figure.savefig = lambda *args, **kwargs: np.min([])
File "<__array_function__ internals>", line 6, in amin
File "/home/lucy/miniconda3/envs/sphinx/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2746, in amin
keepdims=keepdims, initial=initial, where=where)
File "/home/lucy/miniconda3/envs/sphinx/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity
import matplotlib.pyplot as plt
fig = plt.figure()
Total running time of the script: ( 0 minutes 0.231 seconds)