From 11109b8ad2e69dbce2c2e7867d6d1c0c03150bc2 Mon Sep 17 00:00:00 2001 From: Bharat123rox Date: Thu, 16 May 2019 00:46:33 +0530 Subject: DOC: Mention that expand_dims returns a view --- numpy/lib/shape_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/shape_base.py') diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index ac2a25604..21070ce36 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -533,7 +533,7 @@ def expand_dims(a, axis): ------- res : ndarray Output array. The number of dimensions is one greater than that of - the input array. + the input array. This is a view on the original array `a`. See Also -------- -- cgit v1.2.1 From 5aa6c71774a04494458a354586ef19e6726250e3 Mon Sep 17 00:00:00 2001 From: Bharat123rox Date: Thu, 16 May 2019 12:27:23 +0530 Subject: Make wording changes according to @mattip --- numpy/lib/shape_base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'numpy/lib/shape_base.py') diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index 21070ce36..8ebe7a695 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -532,8 +532,7 @@ def expand_dims(a, axis): Returns ------- res : ndarray - Output array. The number of dimensions is one greater than that of - the input array. This is a view on the original array `a`. + View of `a` with the number of dimensions increased by one. See Also -------- -- cgit v1.2.1