diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-11-27 10:58:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-27 10:58:35 -0700 |
commit | 8d161acfdcaaa5f09efa7c2f675e74631da6b293 (patch) | |
tree | c33ef08fb6bf10a3bf588482eed4eef084cf2b20 /numpy/core/fromnumeric.py | |
parent | 220ae326b8cc407f3e4fa3c5d243c71a84749605 (diff) | |
parent | 2eb0b12b75363f539870a09e155bf8e7a6ca8afa (diff) | |
download | numpy-8d161acfdcaaa5f09efa7c2f675e74631da6b293.tar.gz |
Merge pull request #17853 from anntzer/resize
DOC: Clarify docs of np.resize().
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index d65e26827..efb052bc2 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1375,7 +1375,7 @@ def resize(a, new_shape): reshaped_array : ndarray The new array is formed from the data in the old array, repeated if necessary to fill out the required number of elements. The - data are repeated in the order that they are stored in memory. + data are repeated iterating over the array in C-order. See Also -------- @@ -1392,11 +1392,11 @@ def resize(a, new_shape): 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. + It fills the return array with the required number of elements, iterating + over `a` in C-order, disregarding axes (and cycling back from the start if + the new shape is larger). This functionality is therefore not suitable to + resize images, or data where each axis represents a separate and distinct + entity. Examples -------- |