diff options
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/_add_newdocs.py | 2 | ||||
-rw-r--r-- | numpy/core/fromnumeric.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index 33c1f08b1..2461971eb 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -3751,7 +3751,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('squeeze', """ a.squeeze(axis=None) - Remove single-dimensional entries from the shape of `a`. + Remove axes of length one from `a`. Refer to `numpy.squeeze` for full documentation. diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index c1a220dfd..a9f3f1069 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1438,7 +1438,7 @@ def _squeeze_dispatcher(a, axis=None): @array_function_dispatch(_squeeze_dispatcher) def squeeze(a, axis=None): """ - Remove single-dimensional entries from the shape of an array. + Remove axes of length one from `a`. Parameters ---------- @@ -1447,7 +1447,7 @@ def squeeze(a, axis=None): axis : None or int or tuple of ints, optional .. versionadded:: 1.7.0 - Selects a subset of the single-dimensional entries in the + Selects a subset of the entries of length one in the shape. If an axis is selected with shape entry greater than one, an error is raised. @@ -1466,7 +1466,7 @@ def squeeze(a, axis=None): See Also -------- - expand_dims : The inverse operation, adding singleton dimensions + expand_dims : The inverse operation, adding entries of length one reshape : Insert, remove, and combine dimensions, and resize existing ones Examples |