Closed
Description
Hi, all! I'm planning to write a how-to doc for ndarray indexing as per discussion in #19407. I would love to know which use-cases you'd like to see in the doc. These are a few I have in mind (with inspiration from StackOverflow):
- Accessing specific/random rows and columns
- Indexing along a specific axis
- Creating a sub-ndarray from a larger matrix
- Using variables for slicing e.g. having
start
andstop
relative to each other - Indexing based on conditional arguments
- Generating index arrays based on specific conditions
- Fetching indices of N max/min values
- Getting the number of indices generated for an indexing expression without performing the operation
- Indexing with index arrays of shapes different from the ndarray
- Indexing the same ndarray multiple times efficiently
- One-hot encoding with indices
As a new user of NumPy, I'm not sure if some of these cases are trivial or might be out of scope for a doc focus on indexing; I would appreciate any opinions regarding this.
cc: @melissawm @rossbar