Note
Go to the end to download the full example code.
Ran Example#
This is an example of a code example which is displayed and ran.
Note
See Example for an example which is displayed but not ran.
The examples can include documentation in the docstrings and comments alongside the code and outputs. Text uses the reStructuredText format, the same as other documentation in Sphinx.
Code can be split into multiple cells using # %%, see the Python file for exactly how this looks.
print("This is a single code cell")
This is a single code cell
Second Cell#
Formatted text can be written before or between the cells using Python comments and docstrings.
print("This is another code cell")
This is another code cell
Total running time of the script: (0 minutes 0.002 seconds)