summaryrefslogtreecommitdiff
path: root/doc/source/docs/howto_document.rst
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-12-13 14:14:49 -0700
committerGitHub <noreply@github.com>2020-12-13 14:14:49 -0700
commit3fe2d9d2627fc0f84aeed293ff8afa7c1f08d899 (patch)
tree2ea27fe06a19c39e8d7a5fe2f87cb7e05363247d /doc/source/docs/howto_document.rst
parent7d7e446fcbeeff70d905bde2eb0264a797488280 (diff)
parenteff302e5e8678fa17fb3d8156d49eb585b0876d9 (diff)
downloadnumpy-3fe2d9d2627fc0f84aeed293ff8afa7c1f08d899.tar.gz
Merge branch 'master' into fix-issue-10244
Diffstat (limited to 'doc/source/docs/howto_document.rst')
-rw-r--r--doc/source/docs/howto_document.rst63
1 files changed, 35 insertions, 28 deletions
diff --git a/doc/source/docs/howto_document.rst b/doc/source/docs/howto_document.rst
index cf86b7e99..ff726c67c 100644
--- a/doc/source/docs/howto_document.rst
+++ b/doc/source/docs/howto_document.rst
@@ -1,12 +1,41 @@
.. _howto-document:
-A Guide to NumPy/SciPy Documentation
-====================================
+A Guide to NumPy Documentation
+==============================
+
+.. _userdoc_guide:
User documentation
-*******************
-NumPy text documents should follow the `Google developer documentation style guide <https://developers.google.com/style>`_.
+******************
+- In general, we follow the
+ `Google developer documentation style guide <https://developers.google.com/style>`_.
+
+- NumPy style governs cases where:
+
+ - Google has no guidance, or
+ - We prefer not to use the Google style
+
+ Our current rules:
+
+ - We pluralize *index* as *indices* rather than
+ `indexes <https://developers.google.com/style/word-list#letter-i>`_,
+ following the precedent of :func:`numpy.indices`.
+
+ - For consistency we also pluralize *matrix* as *matrices*.
+
+- Grammatical issues inadequately addressed by the NumPy or Google rules are
+ decided by the section on "Grammar and Usage" in the most recent edition of
+ the `Chicago Manual of Style
+ <https://en.wikipedia.org/wiki/The_Chicago_Manual_of_Style>`_.
+
+- We welcome being
+ `alerted <https://github.com/numpy/numpy/issues>`_ to cases
+ we should add to the NumPy style rules.
+
+
+
+.. _docstring_intro:
Docstrings
**********
@@ -40,29 +69,7 @@ after which you may use it::
np.fft.fft2(...)
-.. 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:
+Please use the numpydoc `formatting standard`_ as shown in their example_
.. _`formatting standard`: https://numpydoc.readthedocs.io/en/latest/format.html
+.. _example: https://numpydoc.readthedocs.io/en/latest/example.html