diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-07-08 16:19:04 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 16:19:04 -0600 |
commit | 0da547de39fd1d335d7ad34c6f1e7f153ea72a9b (patch) | |
tree | 62454e7eae3c7f2080bbe8e1fe625c55e460ee93 /numpy/core/fromnumeric.py | |
parent | 25f9f8a8b44f31dff92c119092d682d5d971e508 (diff) | |
parent | d67ace6f9753ca7ed0084ffc1ea5806bc5182602 (diff) | |
download | numpy-0da547de39fd1d335d7ad34c6f1e7f153ea72a9b.tar.gz |
Merge pull request #11482 from Anner-deJong/patch-1
DOC: Include warning in np.resize() docs
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 373e0fde8..b9cc98cae 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1198,6 +1198,16 @@ def resize(a, new_shape): -------- ndarray.resize : resize an array in-place. + Notes + ----- + Warning: This functionality does **not** consider axes separately, + i.e. it does not apply interpolation/extrapolation. + It fills the return array with the required number of elements, taken + from `a` as they are laid out in memory, disregarding strides and axes. + (This is in case the new shape is smaller. For larger, see above.) + This functionality is therefore not suitable to resize images, + or data where each axis represents a separate and distinct entity. + Examples -------- >>> a=np.array([[0,1],[2,3]]) |