Note
Go to the end to download the full example code. or to run this example in your browser via JupyterLite or Binder
Example that fails to execute (with normal thumbnail behaviour)#By default, examples with code blocks that raise an error will have the broken image stamp as their gallery thumbnail. However, this may not be desired, e.g. if only part of the example is expected to fail and it should not look like the entire example fails.
In these cases, the sphinx_gallery_failing_thumbnail variable can be set to False
, which will change the thumbnail selection to the default behaviour as for non-failing examples.
15 # Code source: Thomas S. Binns 16 # License: BSD 3 clause 17 # sphinx_gallery_line_numbers = True 18 19 # sphinx_gallery_failing_thumbnail = False 20 21 import matplotlib.pyplot as plt 22 import numpy as np 23 24 plt.pcolormesh(np.random.randn(100, 100))
<matplotlib.collections.QuadMesh object at 0x7fcd96255000>
This block will raise an AssertionError
Traceback (most recent call last): File "/home/circleci/project/examples/no_output/plot_raise_thumbnail.py", line 29, in <module> assert False AssertionError
Total running time of the script: (0 minutes 0.724 seconds)
Estimated memory usage: 571 MB
Gallery generated by Sphinx-Gallery
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4