326-numpy

Community

Write fast, correct NumPy with guardrails.

Authorulf1
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents slow, buggy, or numerically unstable NumPy code by enforcing idiomatic, memory-efficient patterns and robust validation practices.

Core Features & Use Cases

  • Zero-copy performance discipline: Prefer views, broadcasting with dimension expansion (np.newaxis/None), and avoid accidental copies from fancy/boolean indexing.
  • Type- and shape-safety: Enforce explicit dtypes and shape normalization for reliable downstream model/estimator compatibility.
  • Numerical hygiene & testing: Detect NaNs/Infs correctly and validate with numpy.testing tolerances (assert_allclose) rather than fragile equality.
  • Performance primitives: Use argpartition for top-k selection, out= reuse patterns, and C-level/GIL-releasing operations (e.g., FFT) to enable safe multithreading.

Quick Start

Use the 326-numpy skill to refactor your NumPy code for vectorization, explicit dtypes, and NaN-safe validation while ensuring top-k selection uses argpartition instead of argsort.

Dependency Matrix

Required Modules

None required

Components

assets

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: 326-numpy
Download link: https://github.com/ulf1/trading-regime/archive/main.zip#326-numpy

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.