Skip to content

Commit 972b2dc

Browse files
pvanmulbregtjnothman
authored andcommitted
DOC: Added example of multi-line instruction in Examples section. (#168)
1 parent de21add commit 972b2dc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/format.rst

+8
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,14 @@ The sections of a function's docstring are:
413413
>>> np.add([1, 2], [3, 4])
414414
array([4, 6])
415415

416+
The example code may be split across multiple lines, with each line after
417+
the first starting with '... '::
418+
419+
>>> np.add([[1, 2], [3, 4]],
420+
... [[5, 6], [7, 8]])
421+
array([[ 6, 8],
422+
[10, 12]])
423+
416424
For tests with a result that is random or platform-dependent, mark the
417425
output as such::
418426

0 commit comments

Comments
 (0)