{
  "id": "python/numpy-dot-shape-mismatch",
  "signature": "ValueError: shapes (3,4) and (5,6) not aligned: 4 (dim 1) != 5 (dim 0)",
  "signature_zh": "ValueError：形状 (3,4) 和 (5,6) 不对齐：4（维度 1）!= 5（维度 0）",
  "regex": "ValueError:\\ shapes\\ \\(3,4\\)\\ and\\ \\(5,6\\)\\ not\\ aligned:\\ 4\\ \\(dim\\ 1\\)\\ !=\\ 5\\ \\(dim\\ 0\\)",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "Matrix multiplication requires inner dimensions to match; here they don't.",
  "root_cause_type": "generic",
  "root_cause_zh": "矩阵乘法要求内维相等；此处不匹配。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Still mismatched unless dims align",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Silently produces wrong result or broadcast error",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "A @ B.T if B has shape (6,5) and inner matches",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "np.einsum('ij,jk->ik', A, B) for explicit control",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}