{
  "schemaVersion": "1.0",
  "item": {
    "slug": "numpy",
    "name": "NumPy",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ivangdavila/numpy",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/numpy",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/numpy",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=numpy",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "memory-template.md",
      "setup.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/numpy"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/numpy",
    "agentPageUrl": "https://openagent3.xyz/skills/numpy/agent",
    "manifestUrl": "https://openagent3.xyz/skills/numpy/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/numpy/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Setup",
        "body": "On first use, read setup.md for integration guidelines. Creates ~/numpy/ to store preferences and snippets."
      },
      {
        "title": "When to Use",
        "body": "User needs numerical computing in Python. Agent handles array operations, mathematical computations, linear algebra, and data manipulation with NumPy."
      },
      {
        "title": "Architecture",
        "body": "Memory lives in ~/numpy/. See memory-template.md for structure.\n\n~/numpy/\n├── memory.md      # Preferences + common patterns used\n└── snippets/      # User's saved code patterns"
      },
      {
        "title": "Quick Reference",
        "body": "TopicFileSetup processsetup.mdMemory templatememory-template.md"
      },
      {
        "title": "1. Vectorize First",
        "body": "Never use Python loops for array operations. NumPy's vectorized operations are 10-100x faster.\n\n# BAD - Python loop\nresult = []\nfor x in arr:\n    result.append(x * 2)\n\n# GOOD - Vectorized\nresult = arr * 2"
      },
      {
        "title": "2. Understand Broadcasting",
        "body": "Broadcasting allows operations on arrays of different shapes. Know the rules:\n\nDimensions align from the right\nSize-1 dimensions stretch to match\nMissing dimensions treated as size-1\n\n# Shape (3,1) + (4,) broadcasts to (3,4)\na = np.array([[1], [2], [3]])  # (3,1)\nb = np.array([10, 20, 30, 40])  # (4,)\nresult = a + b  # (3,4)"
      },
      {
        "title": "3. Prefer Views Over Copies",
        "body": "Slicing returns views (same memory). Use .copy() only when needed.\n\n# View - modifying b changes a\nb = a[::2]\n\n# Copy - independent\nb = a[::2].copy()"
      },
      {
        "title": "4. Use Appropriate Dtypes",
        "body": "Choose the smallest dtype that fits your data. Saves memory and speeds up computation.\n\n# For integers 0-255\narr = np.array(data, dtype=np.uint8)\n\n# For floats that don't need double precision\narr = np.array(data, dtype=np.float32)"
      },
      {
        "title": "5. Axis Awareness",
        "body": "Most functions accept axis parameter. Know your axes:\n\naxis=0: operate along rows (down columns)\naxis=1: operate along columns (across rows)\naxis=None or omit: operate on flattened array\n\narr = np.array([[1, 2], [3, 4]])\nnp.sum(arr, axis=0)  # [4, 6] - sum each column\nnp.sum(arr, axis=1)  # [3, 7] - sum each row"
      },
      {
        "title": "6. Leverage Built-in Functions",
        "body": "NumPy has optimized functions for common operations. Don't reinvent them.\n\nNeedUseElement-wise mathnp.sin, np.exp, np.logStatisticsnp.mean, np.std, np.medianLinear algebranp.dot, np.linalg.*Sortingnp.sort, np.argsortSearchingnp.where, np.searchsorted"
      },
      {
        "title": "Shape Mismatches",
        "body": "# TRAP: Confusing (n,) with (n,1) or (1,n)\na = np.array([1, 2, 3])      # shape (3,)\nb = np.array([[1, 2, 3]])    # shape (1,3)\nc = np.array([[1], [2], [3]])  # shape (3,1)\n\n# FIX: Use reshape or newaxis\na.reshape(-1, 1)  # (3,1)\na[np.newaxis, :]  # (1,3)"
      },
      {
        "title": "Silent Type Coercion",
        "body": "# TRAP: Integer array silently truncates floats\narr = np.array([1, 2, 3])  # int64\narr[0] = 1.9  # becomes 1, not 1.9!\n\n# FIX: Declare dtype upfront\narr = np.array([1, 2, 3], dtype=np.float64)"
      },
      {
        "title": "View vs Copy Confusion",
        "body": "# TRAP: Fancy indexing returns copy, slicing returns view\narr = np.array([1, 2, 3, 4, 5])\n\n# This is a VIEW (changes affect original)\nview = arr[1:4]\n\n# This is a COPY (independent)\ncopy = arr[[1, 2, 3]]"
      },
      {
        "title": "Broadcasting Surprises",
        "body": "# TRAP: Unexpected broadcasting\na = np.array([1, 2, 3])\nb = np.array([1, 2])\na + b  # ERROR - shapes don't broadcast\n\n# TRAP: Accidental broadcasting\na = np.zeros((3, 4))\nb = np.array([1, 2, 3])\na + b  # ERROR - (3,4) and (3,) don't align\na + b.reshape(-1, 1)  # Works - (3,4) and (3,1)"
      },
      {
        "title": "In-Place Operations",
        "body": "# TRAP: Some operations modify in-place, others don't\nnp.sort(arr)        # Returns sorted copy\narr.sort()          # Sorts in-place\n\n# Safe pattern: be explicit\narr = np.sort(arr)  # Clear intent"
      },
      {
        "title": "Create Arrays",
        "body": "np.zeros((3, 4))           # All zeros\nnp.ones((3, 4))            # All ones\nnp.full((3, 4), 7)         # All sevens\nnp.eye(3)                  # Identity matrix\nnp.arange(0, 10, 2)        # [0, 2, 4, 6, 8]\nnp.linspace(0, 1, 5)       # [0, 0.25, 0.5, 0.75, 1]\nnp.random.rand(3, 4)       # Uniform [0,1)\nnp.random.randn(3, 4)      # Normal distribution"
      },
      {
        "title": "Reshape and Stack",
        "body": "arr.reshape(2, 6)          # New shape (must match size)\narr.flatten()              # 1D copy\narr.ravel()                # 1D view\nnp.concatenate([a, b])     # Join along existing axis\nnp.stack([a, b])           # Join along new axis\nnp.vstack([a, b])          # Stack vertically\nnp.hstack([a, b])          # Stack horizontally"
      },
      {
        "title": "Boolean Indexing",
        "body": "arr = np.array([1, 5, 3, 8, 2])\nmask = arr > 3\narr[mask]                  # [5, 8]\narr[arr > 3] = 0           # Replace values > 3 with 0\nnp.where(arr > 3, 1, 0)    # 1 where >3, else 0"
      },
      {
        "title": "Linear Algebra",
        "body": "np.dot(a, b)               # Matrix multiplication\na @ b                      # Same (Python 3.5+)\nnp.linalg.inv(a)           # Inverse\nnp.linalg.det(a)           # Determinant\nnp.linalg.eig(a)           # Eigenvalues/vectors\nnp.linalg.solve(a, b)      # Solve Ax = b"
      },
      {
        "title": "Security & Privacy",
        "body": "Data that stays local:\n\nAll computations run locally\nCode patterns saved in ~/numpy/\n\nThis skill does NOT:\n\nSend data externally\nAccess files outside ~/numpy/\nRequire network connectivity"
      },
      {
        "title": "Related Skills",
        "body": "Install with clawhub install <slug> if user confirms:\n\ndata — data processing workflows\nmath — mathematical computations\nstatistics — statistical analysis"
      },
      {
        "title": "Feedback",
        "body": "If useful: clawhub star numpy\nStay updated: clawhub sync"
      }
    ],
    "body": "Setup\n\nOn first use, read setup.md for integration guidelines. Creates ~/numpy/ to store preferences and snippets.\n\nWhen to Use\n\nUser needs numerical computing in Python. Agent handles array operations, mathematical computations, linear algebra, and data manipulation with NumPy.\n\nArchitecture\n\nMemory lives in ~/numpy/. See memory-template.md for structure.\n\n~/numpy/\n├── memory.md      # Preferences + common patterns used\n└── snippets/      # User's saved code patterns\n\nQuick Reference\nTopic\tFile\nSetup process\tsetup.md\nMemory template\tmemory-template.md\nCore Rules\n1. Vectorize First\n\nNever use Python loops for array operations. NumPy's vectorized operations are 10-100x faster.\n\n# BAD - Python loop\nresult = []\nfor x in arr:\n    result.append(x * 2)\n\n# GOOD - Vectorized\nresult = arr * 2\n\n2. Understand Broadcasting\n\nBroadcasting allows operations on arrays of different shapes. Know the rules:\n\nDimensions align from the right\nSize-1 dimensions stretch to match\nMissing dimensions treated as size-1\n# Shape (3,1) + (4,) broadcasts to (3,4)\na = np.array([[1], [2], [3]])  # (3,1)\nb = np.array([10, 20, 30, 40])  # (4,)\nresult = a + b  # (3,4)\n\n3. Prefer Views Over Copies\n\nSlicing returns views (same memory). Use .copy() only when needed.\n\n# View - modifying b changes a\nb = a[::2]\n\n# Copy - independent\nb = a[::2].copy()\n\n4. Use Appropriate Dtypes\n\nChoose the smallest dtype that fits your data. Saves memory and speeds up computation.\n\n# For integers 0-255\narr = np.array(data, dtype=np.uint8)\n\n# For floats that don't need double precision\narr = np.array(data, dtype=np.float32)\n\n5. Axis Awareness\n\nMost functions accept axis parameter. Know your axes:\n\naxis=0: operate along rows (down columns)\naxis=1: operate along columns (across rows)\naxis=None or omit: operate on flattened array\narr = np.array([[1, 2], [3, 4]])\nnp.sum(arr, axis=0)  # [4, 6] - sum each column\nnp.sum(arr, axis=1)  # [3, 7] - sum each row\n\n6. Leverage Built-in Functions\n\nNumPy has optimized functions for common operations. Don't reinvent them.\n\nNeed\tUse\nElement-wise math\tnp.sin, np.exp, np.log\nStatistics\tnp.mean, np.std, np.median\nLinear algebra\tnp.dot, np.linalg.*\nSorting\tnp.sort, np.argsort\nSearching\tnp.where, np.searchsorted\nNumPy Traps\nShape Mismatches\n# TRAP: Confusing (n,) with (n,1) or (1,n)\na = np.array([1, 2, 3])      # shape (3,)\nb = np.array([[1, 2, 3]])    # shape (1,3)\nc = np.array([[1], [2], [3]])  # shape (3,1)\n\n# FIX: Use reshape or newaxis\na.reshape(-1, 1)  # (3,1)\na[np.newaxis, :]  # (1,3)\n\nSilent Type Coercion\n# TRAP: Integer array silently truncates floats\narr = np.array([1, 2, 3])  # int64\narr[0] = 1.9  # becomes 1, not 1.9!\n\n# FIX: Declare dtype upfront\narr = np.array([1, 2, 3], dtype=np.float64)\n\nView vs Copy Confusion\n# TRAP: Fancy indexing returns copy, slicing returns view\narr = np.array([1, 2, 3, 4, 5])\n\n# This is a VIEW (changes affect original)\nview = arr[1:4]\n\n# This is a COPY (independent)\ncopy = arr[[1, 2, 3]]\n\nBroadcasting Surprises\n# TRAP: Unexpected broadcasting\na = np.array([1, 2, 3])\nb = np.array([1, 2])\na + b  # ERROR - shapes don't broadcast\n\n# TRAP: Accidental broadcasting\na = np.zeros((3, 4))\nb = np.array([1, 2, 3])\na + b  # ERROR - (3,4) and (3,) don't align\na + b.reshape(-1, 1)  # Works - (3,4) and (3,1)\n\nIn-Place Operations\n# TRAP: Some operations modify in-place, others don't\nnp.sort(arr)        # Returns sorted copy\narr.sort()          # Sorts in-place\n\n# Safe pattern: be explicit\narr = np.sort(arr)  # Clear intent\n\nEssential Patterns\nCreate Arrays\nnp.zeros((3, 4))           # All zeros\nnp.ones((3, 4))            # All ones\nnp.full((3, 4), 7)         # All sevens\nnp.eye(3)                  # Identity matrix\nnp.arange(0, 10, 2)        # [0, 2, 4, 6, 8]\nnp.linspace(0, 1, 5)       # [0, 0.25, 0.5, 0.75, 1]\nnp.random.rand(3, 4)       # Uniform [0,1)\nnp.random.randn(3, 4)      # Normal distribution\n\nReshape and Stack\narr.reshape(2, 6)          # New shape (must match size)\narr.flatten()              # 1D copy\narr.ravel()                # 1D view\nnp.concatenate([a, b])     # Join along existing axis\nnp.stack([a, b])           # Join along new axis\nnp.vstack([a, b])          # Stack vertically\nnp.hstack([a, b])          # Stack horizontally\n\nBoolean Indexing\narr = np.array([1, 5, 3, 8, 2])\nmask = arr > 3\narr[mask]                  # [5, 8]\narr[arr > 3] = 0           # Replace values > 3 with 0\nnp.where(arr > 3, 1, 0)    # 1 where >3, else 0\n\nLinear Algebra\nnp.dot(a, b)               # Matrix multiplication\na @ b                      # Same (Python 3.5+)\nnp.linalg.inv(a)           # Inverse\nnp.linalg.det(a)           # Determinant\nnp.linalg.eig(a)           # Eigenvalues/vectors\nnp.linalg.solve(a, b)      # Solve Ax = b\n\nSecurity & Privacy\n\nData that stays local:\n\nAll computations run locally\nCode patterns saved in ~/numpy/\n\nThis skill does NOT:\n\nSend data externally\nAccess files outside ~/numpy/\nRequire network connectivity\nRelated Skills\n\nInstall with clawhub install <slug> if user confirms:\n\ndata — data processing workflows\nmath — mathematical computations\nstatistics — statistical analysis\nFeedback\nIf useful: clawhub star numpy\nStay updated: clawhub sync"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/numpy",
    "publisherUrl": "https://clawhub.ai/ivangdavila/numpy",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/numpy",
    "downloadUrl": "https://openagent3.xyz/downloads/numpy",
    "agentUrl": "https://openagent3.xyz/skills/numpy/agent",
    "manifestUrl": "https://openagent3.xyz/skills/numpy/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/numpy/agent.md"
  }
}