Skip to content

Commit

Permalink
DOC: Added example of multi-line instruction in Examples section. (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvanmulbregt authored and jnothman committed Apr 30, 2018
1 parent de21add commit 972b2dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,14 @@ The sections of a function's docstring are:
>>> np.add([1, 2], [3, 4])
array([4, 6])

The example code may be split across multiple lines, with each line after
the first starting with '... '::

>>> np.add([[1, 2], [3, 4]],
... [[5, 6], [7, 8]])
array([[ 6, 8],
[10, 12]])

For tests with a result that is random or platform-dependent, mark the
output as such::

Expand Down

0 comments on commit 972b2dc

Please sign in to comment.