numpy-memory
NumPy memory management revolves around the concept of "strides." Strides define the number of bytes to skip in a flat 1D buffer to move to the next element in an N-dimensional space. Understanding th
npx skills add majiayu000/claude-skill-registry --skill numpy-memory-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-memory description: Deep dive into memory layout, including strides, C vs Fortran order, and zero-copy view generation via stride tricks. Triggers: strides, C-order, Fortran-order, memory locality, stride_tricks. --- ## Overview NumPy memory management revolves around the concept of "strides." Strides define the number of bytes to skip in a flat 1D buffer to move to the next element in an N-dimensional space. Understanding this allows for zero-copy operations like transposition and complex sliding windows. ## When to Use - Optimizing high-performance code for CPU cache locality. - Creating overlapping sliding windows for signal processing without duplicating data. - Interfacing with libraries that require specific memory orders (e.g., BLAS/Fortran). - Manipulating array logic without incurring the cost of data copying. ## Decision Tree 1. Need to optimize for row-wise processing? - Use C-order (row-major). Smallest stride is on the last axis. 2. Interfacing with legacy Fortran or BLAS? - Use Fortran-order (column-major). Smallest stride is on the first axis. 3. Want to create a sliding window view? - Use `np.lib.stride_tricks.as_strided`. (Use with caution). ## Work
- Overview
- When to Use
- Decision Tree
- Workflows
- Non-Obvious Insights
- Evidence
- Scripts
- Dependencies
- References
What does the numpy-memory skill do?
NumPy memory management revolves around the concept of "strides." Strides define the number of bytes to skip in a flat 1D buffer to move to the next element in an N-dimensional space. Understanding th
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill numpy-memory-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.
