From cbaa809820656bf39f4ec78a9bec1426239ce440 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sat, 3 Jun 2017 13:23:46 +0100 Subject: MAINT: Don't internally use the one-argument where nonzero is a clearer spelling --- numpy/doc/indexing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/doc/indexing.py') diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py index 39b2c73ed..b286a904d 100644 --- a/numpy/doc/indexing.py +++ b/numpy/doc/indexing.py @@ -422,7 +422,7 @@ object: :: [37, 40, 43], [46, 49, 52]]) -For this reason it is possible to use the output from the np.where() +For this reason it is possible to use the output from the np.nonzero() function directly as an index since it always returns a tuple of index arrays. -- cgit v1.2.1 From ac6b1a902b99e340cf7eeeeb7392c91e38db9dd8 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Mon, 13 Nov 2017 23:45:45 -0800 Subject: ENH: don't show boolean dtype, as it is implied --- numpy/doc/indexing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/doc/indexing.py') diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py index b286a904d..5f5033117 100644 --- a/numpy/doc/indexing.py +++ b/numpy/doc/indexing.py @@ -240,7 +240,7 @@ The result will be multidimensional if y has more dimensions than b. For example: :: >>> b[:,5] # use a 1-D boolean whose first dim agrees with the first dim of y - array([False, False, False, True, True], dtype=bool) + array([False, False, False, True, True]) >>> y[b[:,5]] array([[21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34]]) -- cgit v1.2.1 From 4afb1f2b0a8610edada66fea5b309c27f48a17b6 Mon Sep 17 00:00:00 2001 From: logeaux <36168460+logeaux@users.noreply.github.com> Date: Sat, 14 Jul 2018 17:06:09 -0500 Subject: DOC: Updated Slice Description --- numpy/doc/indexing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/doc/indexing.py') diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py index 5f5033117..087a688bc 100644 --- a/numpy/doc/indexing.py +++ b/numpy/doc/indexing.py @@ -93,7 +93,7 @@ well. A few examples illustrates best: :: [21, 24, 27]]) Note that slices of arrays do not copy the internal array data but -also produce new views of the original data. +only produce new views of the original data. It is possible to index arrays with other arrays for the purposes of selecting lists of values out of arrays into new arrays. There are -- cgit v1.2.1 From e0ffa191ade1ac8548cad38a73fecc9f2528f9ef Mon Sep 17 00:00:00 2001 From: wtli Date: Wed, 6 Mar 2019 17:33:48 +0800 Subject: DOC: add copy on slicing notice --- numpy/doc/indexing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'numpy/doc/indexing.py') diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py index 087a688bc..f80d6c29e 100644 --- a/numpy/doc/indexing.py +++ b/numpy/doc/indexing.py @@ -93,7 +93,9 @@ well. A few examples illustrates best: :: [21, 24, 27]]) Note that slices of arrays do not copy the internal array data but -only produce new views of the original data. +only produce new views of the original data. This is different from +list or tuple slicing and an explicit ``copy()`` is recommended if +the original data is not required anymore. It is possible to index arrays with other arrays for the purposes of selecting lists of values out of arrays into new arrays. There are -- cgit v1.2.1