numpy-numerical-analysis-1-array-creation-and-operations
Sub-skill of numpy-numerical-analysis: 1. Array Creation and Operations (+1).
Best use case
numpy-numerical-analysis-1-array-creation-and-operations is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of numpy-numerical-analysis: 1. Array Creation and Operations (+1).
Teams using numpy-numerical-analysis-1-array-creation-and-operations should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/1-array-creation-and-operations/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How numpy-numerical-analysis-1-array-creation-and-operations Compares
| Feature / Agent | numpy-numerical-analysis-1-array-creation-and-operations | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of numpy-numerical-analysis: 1. Array Creation and Operations (+1).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 1. Array Creation and Operations (+1)
## 1. Array Creation and Operations
**Array Creation:**
```python
import numpy as np
# Create arrays
zeros = np.zeros((3, 3))
ones = np.ones((3, 3))
identity = np.eye(3)
arange = np.arange(0, 10, 0.1) # 0 to 10 with step 0.1
linspace = np.linspace(0, 10, 100) # 100 points from 0 to 10
# From list
arr = np.array([1, 2, 3, 4, 5])
# Multi-dimensional
matrix = np.array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
# Random arrays
random_uniform = np.random.rand(3, 3) # Uniform [0, 1)
random_normal = np.random.randn(3, 3) # Standard normal
random_int = np.random.randint(0, 100, size=(3, 3))
```
**Array Operations:**
```python
# Element-wise operations
a = np.array([1, 2, 3, 4, 5])
b = np.array([10, 20, 30, 40, 50])
c = a + b # [11, 22, 33, 44, 55]
d = a * b # [10, 40, 90, 160, 250]
e = a ** 2 # [1, 4, 9, 16, 25]
# Mathematical functions
sin_a = np.sin(a)
cos_a = np.cos(a)
exp_a = np.exp(a)
log_a = np.log(a)
sqrt_a = np.sqrt(a)
# Statistical operations
mean = np.mean(a)
std = np.std(a)
var = np.var(a)
min_val = np.min(a)
max_val = np.max(a)
```
## 2. Matrix Operations
**Matrix Multiplication:**
```python
def compute_force_response(
mass_matrix: np.ndarray,
stiffness_matrix: np.ndarray,
force_vector: np.ndarray
) -> np.ndarray:
"""
Compute structural response: F = K * x
Solve for displacement: x = K^-1 * F
Args:
mass_matrix: Mass matrix [M]
stiffness_matrix: Stiffness matrix [K]
force_vector: Applied force vector {F}
Returns:
Displacement vector {x}
"""
# Static response (ignoring mass for now)
displacement = np.linalg.solve(stiffness_matrix, force_vector)
return displacement
# Example: 3DOF spring-mass system
K = np.array([
[200, -100, 0],
[-100, 200, -100],
[0, -100, 100]
]) # Stiffness matrix (N/m)
F = np.array([1000, 0, 0]) # Force at first node (N)
x = compute_force_response(None, K, F)
print(f"Displacements: {x} m")
```
**Matrix Properties:**
```python
def analyze_matrix_properties(matrix: np.ndarray) -> dict:
"""
Analyze matrix properties for structural analysis.
Args:
matrix: Input matrix (mass or stiffness)
Returns:
Dictionary with matrix properties
"""
properties = {}
# Determinant
properties['determinant'] = np.linalg.det(matrix)
# Condition number (numerical stability indicator)
properties['condition_number'] = np.linalg.cond(matrix)
# Rank
properties['rank'] = np.linalg.matrix_rank(matrix)
# Eigenvalues and eigenvectors
eigenvalues, eigenvectors = np.linalg.eig(matrix)
properties['eigenvalues'] = eigenvalues
properties['eigenvectors'] = eigenvectors
# Is symmetric?
properties['is_symmetric'] = np.allclose(matrix, matrix.T)
# Is positive definite? (all eigenvalues > 0)
properties['is_positive_definite'] = np.all(eigenvalues > 0)
return properties
# Example: Check stiffness matrix properties
K = np.array([
[200, -100, 0],
[-100, 200, -100],
[0, -100, 100]
])
props = analyze_matrix_properties(K)
print(f"Determinant: {props['determinant']:.2f}")
print(f"Condition number: {props['condition_number']:.2f}")
print(f"Eigenvalues: {props['eigenvalues']}")
print(f"Positive definite: {props['is_positive_definite']}")
```Related Skills
mnt-analysis-cleanup
Survey, classify, and clean up `/mnt/local-analysis/` (or any sibling-to-workspace-hub directory holding orphan worktrees, codex-burn artifacts, agent log accumulations, and outer-clone duplicates) without losing useful code/work. Surfaces a tiered approval menu rather than baking decisions; defers all destructive ops until user confirms.
memory-bridge-operations
Operate and recover the Hermes-to-repo memory bridge: drift checks, quality gate, bridge commits, push verification, and stash recovery when pre-bridge scripts fail after generating outputs.
staged-issue-tree-creation-with-deduplication
Pattern for creating hierarchical GitHub issue trees from phased project plans while checking for duplicate/overlapping issues
parallel-array-alignment-pattern
Maintain index synchronization between parallel arrays when adding new entries to preserve label-path mappings
repo-architecture-analysis
Scan a Python repo's package structure, count classes/functions, classify module maturity (PRODUCTION/DEVELOPMENT/SKELETON/GAP), and generate architecture reports with Mermaid diagrams. Use when asked to analyze codebase structure, find untested packages, or assess module maturity.
github-issue-lifecycle-operations
Class-level GitHub issue lifecycle operations: issue creation, planning/execution routing, labels, evidence fields, roadmap anchors, closeout races, and visual planning.
viv-analysis
Assess vortex-induced vibration (VIV) for risers and tubular members with natural frequency and safety factor calculations. Use for VIV susceptibility analysis, natural frequency calculation, vortex shedding assessment, and tubular member fatigue from VIV.
structural-analysis
Structural analysis for marine and offshore structures per DNV/API/ISO codes. Use when performing ULS/ALS limit state checks, column buckling, beam deflection, tubular joint capacity (DNV-RP-C203), or stiffened panel analysis. Covers section properties, combined loading, and ALS dented pipe assessment.
signal-analysis
Perform signal processing, rainflow cycle counting, and spectral analysis for fatigue and time series data. Use for analyzing stress time histories, computing FFT/PSD, extracting fatigue cycles (ASTM E1049-85), and batch processing OrcaFlex signals.
orcawave-qtf-analysis
Second-order wave force QTF computation in OrcaWave. Use when computing mean drift forces, difference-frequency or sum-frequency QTFs, slow-drift response, or applying Newman approximation for offshore structures.
orcaflex-modal-analysis
Perform modal and frequency analysis on OrcaFlex models to extract natural frequencies, mode shapes, and identify dominant DOF responses. Use for VIV assessment, resonance identification, and structural dynamics characterization.
orcaflex-jumper-analysis
Rigid and flexible jumper modelling in OrcaFlex covering installation analysis, in-place analysis, VIV screening, and fatigue assessment.