Skip to content

Commit

Permalink
DOC, MAINT: fix typo in np.fill_diagonal docstring example
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkid committed Jun 24, 2015
1 parent 3d2b8ca commit 3444961
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions numpy/lib/index_tricks.py
Expand Up @@ -724,7 +724,9 @@ def fill_diagonal(a, val, wrap=False):
[0, 0, 0],
[0, 0, 4]])
# tall matrices no wrap
The wrap option affects only tall matrices:
>>> # tall matrices no wrap
>>> a = np.zeros((5, 3),int)
>>> fill_diagonal(a, 4)
>>> a
Expand All @@ -734,7 +736,7 @@ def fill_diagonal(a, val, wrap=False):
[0, 0, 0],
[0, 0, 0]])
# tall matrices wrap
>>> # tall matrices wrap
>>> a = np.zeros((5, 3),int)
>>> fill_diagonal(a, 4, wrap=True)
>>> a
Expand All @@ -744,7 +746,7 @@ def fill_diagonal(a, val, wrap=False):
[0, 0, 0],
[4, 0, 0]])
# wide matrices
>>> # wide matrices
>>> a = np.zeros((3, 5),int)
>>> fill_diagonal(a, 4, wrap=True)
>>> a
Expand Down

0 comments on commit 3444961

Please sign in to comment.