summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
authorMukulika <mukulikapahari@gmail.com>2021-08-18 19:53:47 +0530
committerMukulika <mukulikapahari@gmail.com>2021-08-18 22:13:26 +0530
commita3c72d61587e5896f39c86d4696a7cd449c3ca7b (patch)
treee16be007ddc4a5be7b642f9c06339fce8d5cbd25 /doc/source/reference
parenta69e225446ba5d1232506c47e72d796dde621edf (diff)
downloadnumpy-a3c72d61587e5896f39c86d4696a7cd449c3ca7b.tar.gz
DOC: Replaced indexing stub doc with routines
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/arrays.indexing.rst122
-rw-r--r--doc/source/reference/routines.indexing.rst69
-rw-r--r--doc/source/reference/routines.rst1
3 files changed, 66 insertions, 126 deletions
diff --git a/doc/source/reference/arrays.indexing.rst b/doc/source/reference/arrays.indexing.rst
index cba028baa..100d22e02 100644
--- a/doc/source/reference/arrays.indexing.rst
+++ b/doc/source/reference/arrays.indexing.rst
@@ -1,60 +1,70 @@
-.. for doctests
- >>> import numpy as np
-
+.. _routines.indexing:
.. _arrays.indexing:
-********
-Indexing
-********
-
-.. seealso::
-
- :ref:`basics.indexing`
-
- :ref:`Indexing routines <routines.indexing>`
-
-Array indexing refers to any use of the square brackets ([]) to index
-array values. There are many options to indexing, which give NumPy
-indexing great power, but with power comes some complexity and the
-potential for confusion. This section is just an overview of the
-various options and issues related to indexing. Further details can be
-found in the relevant sections of :ref:`basics.indexing`.
-
-
-Basic indexing
-==============
-
-Basic indexing will be triggered through single element indexing or
-slicing and striding.
-
-Single element indexing works
-exactly like that for other standard Python sequences but has been expanded
-to support multidimensional indexing
-for multidimensional NumPy arrays. For more details and examples, see
-:ref:`single-element-indexing`.
-
-It is possible to slice and stride arrays to extract arrays of the
-same number of dimensions, but of different sizes than the original.
-The slicing and striding work exactly the same way it does for lists
-and tuples except that they can be applied to multiple dimensions as
-well. See :ref:`basic-slicing-and-indexing` for more information and examples.
-
-
-Advanced indexing
+Indexing routines
=================
-Arrays can be indexed with other arrays to
-select lists of values out of arrays into new arrays. There are
-two different ways of accomplishing this. One uses one or more arrays
-of index values. The other involves giving a boolean array of the proper
-shape to indicate the values to be selected. Index arrays are a very
-powerful tool that allows one to avoid looping over individual elements in
-arrays and thus greatly improve performance. See :ref:`advanced-indexing`
-for more information and examples.
-
-
-Other indexing options
-======================
-
-:ref:`arrays.indexing.fields`, :ref:`flat-iterator-indexing` are a couple
-of other indexing options. \ No newline at end of file
+.. seealso:: :ref:`basics.indexing`
+
+.. currentmodule:: numpy
+
+Generating index arrays
+-----------------------
+.. autosummary::
+ :toctree: generated/
+
+ c_
+ r_
+ s_
+ nonzero
+ where
+ indices
+ ix_
+ ogrid
+ ravel_multi_index
+ unravel_index
+ diag_indices
+ diag_indices_from
+ mask_indices
+ tril_indices
+ tril_indices_from
+ triu_indices
+ triu_indices_from
+
+Indexing-like operations
+------------------------
+.. autosummary::
+ :toctree: generated/
+
+ take
+ take_along_axis
+ choose
+ compress
+ diag
+ diagonal
+ select
+ lib.stride_tricks.sliding_window_view
+ lib.stride_tricks.as_strided
+
+Inserting data into arrays
+--------------------------
+.. autosummary::
+ :toctree: generated/
+
+ place
+ put
+ put_along_axis
+ putmask
+ fill_diagonal
+
+Iterating over arrays
+---------------------
+.. autosummary::
+ :toctree: generated/
+
+ nditer
+ ndenumerate
+ ndindex
+ nested_iters
+ flatiter
+ lib.Arrayterator
diff --git a/doc/source/reference/routines.indexing.rst b/doc/source/reference/routines.indexing.rst
deleted file mode 100644
index eebbf4989..000000000
--- a/doc/source/reference/routines.indexing.rst
+++ /dev/null
@@ -1,69 +0,0 @@
-.. _routines.indexing:
-
-Indexing routines
-=================
-
-.. seealso:: :ref:`Indexing <arrays.indexing>`
-
-.. currentmodule:: numpy
-
-Generating index arrays
------------------------
-.. autosummary::
- :toctree: generated/
-
- c_
- r_
- s_
- nonzero
- where
- indices
- ix_
- ogrid
- ravel_multi_index
- unravel_index
- diag_indices
- diag_indices_from
- mask_indices
- tril_indices
- tril_indices_from
- triu_indices
- triu_indices_from
-
-Indexing-like operations
-------------------------
-.. autosummary::
- :toctree: generated/
-
- take
- take_along_axis
- choose
- compress
- diag
- diagonal
- select
- lib.stride_tricks.sliding_window_view
- lib.stride_tricks.as_strided
-
-Inserting data into arrays
---------------------------
-.. autosummary::
- :toctree: generated/
-
- place
- put
- put_along_axis
- putmask
- fill_diagonal
-
-Iterating over arrays
----------------------
-.. autosummary::
- :toctree: generated/
-
- nditer
- ndenumerate
- ndindex
- nested_iters
- flatiter
- lib.Arrayterator
diff --git a/doc/source/reference/routines.rst b/doc/source/reference/routines.rst
index 5d6a823b7..593d017cc 100644
--- a/doc/source/reference/routines.rst
+++ b/doc/source/reference/routines.rst
@@ -30,7 +30,6 @@ indentation.
routines.fft
routines.functional
routines.help
- routines.indexing
routines.io
routines.linalg
routines.logic