Skip to content

DOC,DISCUSS: A How-To guide for ndarray indexing  #19586

Closed
@Mukulikaa

Description

@Mukulikaa

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 and stop 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      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