diff options
author | mattip <matti.picus@gmail.com> | 2018-04-13 15:01:16 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2018-04-13 15:01:16 +0300 |
commit | c989bd430b73181c5415df5f9ccdcfcc314445cb (patch) | |
tree | 3b35c686cfd94c30475d67344f27077f5eba26f0 /doc/source/docs | |
parent | 1486f3756f0399c4a6ae2c42cb748669f1ff4dbe (diff) | |
download | numpy-c989bd430b73181c5415df5f9ccdcfcc314445cb.tar.gz |
render the example in numpydoc, add ifconfig for host python major version
Diffstat (limited to 'doc/source/docs')
-rw-r--r-- | doc/source/docs/howto_document.rst | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/source/docs/howto_document.rst b/doc/source/docs/howto_document.rst index 35fe95fa4..de7d06cf8 100644 --- a/doc/source/docs/howto_document.rst +++ b/doc/source/docs/howto_document.rst @@ -33,8 +33,29 @@ after which you may use it:: np.fft.fft2(...) -.. rubric:: **For convenience the** `formatting standard`_ **is included below.** +.. rubric:: + **For convenience the** `formatting standard`_ **is included below with an + example** .. include:: ../../sphinxext/doc/format.rst +.. _example: + +Example Source +============== + +.. literalinclude:: ../../sphinxext/doc/example.py + + + +Example Rendered +================ + +.. ifconfig:: python_version_major < '3' + + The example is rendered only when sphinx is run with python3 and above + +.. automodule:: doc.example + :members: + .. _`formatting standard`: https://numpydoc.readthedocs.io/en/latest/format.html |