Skip to content

DOC: Created an indexing how-to #20093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/source/user/basics.copies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ do not reflect on the original array. Making a copy is slower and
memory-consuming but sometimes necessary. A copy can be forced by using
:meth:`.ndarray.copy`.

.. _indexing-operations:

Indexing operations
===================

Expand Down
6 changes: 5 additions & 1 deletion doc/source/user/basics.indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Note that in Python, ``x[(exp1, exp2, ..., expN)]`` is equivalent to
``x[exp1, exp2, ..., expN]``; the latter is just syntactic sugar
for the former.

.. _basic-indexing:

Basic indexing
--------------
Expand Down Expand Up @@ -88,6 +89,7 @@ that is subsequently indexed by 2.
rapidly changing location in memory. This difference represents a
great potential for confusion.

.. _slicing-and-striding:

Slicing and striding
^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -226,6 +228,7 @@ concepts to remember include:
.. index::
pair: ndarray; view

.. _dimensional-indexing-tools:

Dimensional indexing tools
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -470,6 +473,7 @@ such an array with an image with shape (ny, nx) with dtype=np.uint8
lookup table) will result in an array of shape (ny, nx, 3) where a
triple of RGB values is associated with each pixel location.

.. _boolean-indexing:

Boolean array indexing
^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -851,7 +855,7 @@ For this reason, it is possible to use the output from the
:meth:`np.nonzero() <ndarray.nonzero>` function directly as an index since
it always returns a tuple of index arrays.

Because the special treatment of tuples, they are not automatically
Because of the special treatment of tuples, they are not automatically
converted to an array as a list would be. As an example: ::

>>> z[[1, 1, 1, 1]] # produces a large array
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy