Skip to content

Commit

Permalink
Resize: Show an example that explains the potentially confusing behav…
Browse files Browse the repository at this point in the history
…iour of resize
  • Loading branch information
nils-werner committed Nov 20, 2014
1 parent 8bcb756 commit e4d3069
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions numpy/core/fromnumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,9 @@ def resize(a, new_shape):
Examples
--------
>>> a=np.array([[0,1],[2,3]])
>>> np.resize(a,(2,3))
array([[0, 1, 2],
[3, 0, 1]])
>>> np.resize(a,(1,4))
array([[0, 1, 2, 3]])
>>> np.resize(a,(2,4))
Expand Down

0 comments on commit e4d3069

Please sign in to comment.