From e4d30698747b01d798ee7aac565bf290f6b0f5b7 Mon Sep 17 00:00:00 2001 From: Nils Werner Date: Thu, 20 Nov 2014 08:26:13 +0100 Subject: Resize: Show an example that explains the potentially confusing behaviour of resize --- numpy/core/fromnumeric.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 28c1c7d75..84a10bf04 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -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)) -- cgit v1.2.1