numpy-indexing
Indexing in NumPy ranges from basic slicing (zero-copy) to advanced "fancy indexing (always creates a copy). Understanding the distinction is vital for memory management and avoiding unintended side
npx skills add majiayu000/claude-skill-registry --skill numpy-indexing-cuba6112-skillfactory-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
--- name: numpy-indexing description: Advanced indexing techniques including slicing, fancy indexing, and boolean masks, along with memory implications of views vs. copies. Triggers: indexing, slicing, fancy indexing, boolean mask, np.where, np.ix_. --- ## Overview Indexing in NumPy ranges from basic slicing (zero-copy) to advanced "fancy" indexing (always creates a copy). Understanding the distinction is vital for memory management and avoiding unintended side effects in data analysis. ## When to Use - Extracting sub-regions of arrays for processing. - Filtering data based on complex conditional logic (boolean masking). - Selecting arbitrary elements using coordinate lists. - Managing memory when dealing with large datasets that have small regions of interest. ## Decision Tree 1. Do you need a view or a copy? - View: Use basic slicing (`arr[0:5]`). - Copy: Use advanced indexing (`arr[[0, 1, 2]]`) or `.copy()`. 2. Are you filtering by value? - Use a boolean mask: `arr[arr > threshold]`. 3. Selecting a grid of values across axes? - Use `np.ix_` to construct the selection mesh. ## Workflows 1. **Filtering Data with Boolean Masks** - Apply a comparison operator (e.g., `x > 0`) to an a
- Overview
- When to Use
- Decision Tree
- Workflows
- Non-Obvious Insights
- Evidence
- Scripts
- Dependencies
- References
What does the numpy-indexing skill do?
Indexing in NumPy ranges from basic slicing (zero-copy) to advanced "fancy indexing (always creates a copy). Understanding the distinction is vital for memory management and avoiding unintended side
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill numpy-indexing-cuba6112-skillfactory-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
