{
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-24",
  "advantages": [],
  "slug": "npz",
  "term": "NumPy NPZ archive",
  "aliases": [
    ".npz",
    "NPZ"
  ],
  "definition": "NPZ is NumPy's ZIP-based container for storing multiple arrays as NPY members.",
  "note": "NpzFile loads array members lazily when a caller accesses them. Successful construction or access to one member is not evidence that another member was read and checked. [numpy-npz] [numpy-npz-source]\n\nZIP member checks and array semantics answer different questions. A member containing a changed NPY header can receive a valid new CRC when repackaged; the CRC does not identify the intended shape, units or coordinate mapping. [npy-format] [python-zip]\n\nA preservation package needs both an expected inventory and checked bytes. BagIt 1.0 formalizes this distinction, but NPZ is not thereby a BagIt bag. Checksums alone do not authenticate the source. [bagit-inventory]",
  "related": [
    "npy",
    "zip-archive",
    "archive-member",
    "checksum"
  ],
  "limitations": [
    "These notes do not certify hostile archives, duplicate names, pickle safety or resource limits.",
    "A trusted expected member inventory and application schema are separate from a successful selected read."
  ],
  "citations": [
    {
      "id": "npy-format",
      "title": "NumPy format documentation: NPY and NPZ layout",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "numpy-npz",
      "title": "NumPy NpzFile API",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.lib.npyio.NpzFile.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "numpy-npz-source",
      "title": "NumPy 2.5.4 pinned NpzFile implementation",
      "url": "https://github.com/numpy/numpy/blob/a3d0ef1df045b858e68115001fdabc930bb3b68c/numpy/lib/_npyio_impl.py",
      "accessed": "2026-10-24"
    },
    {
      "id": "bagit-inventory",
      "title": "RFC 8493: BagIt completeness, validity and active-attack limits",
      "url": "https://www.rfc-editor.org/rfc/rfc8493.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "python-zip",
      "title": "CPython 3.12 zipfile API",
      "url": "https://docs.python.org/3.12/library/zipfile.html",
      "accessed": "2026-10-24"
    }
  ],
  "provenance": [
    "Format/API documentation and NumPy commit a3d0ef1df045b858e68115001fdabc930bb3b68c.",
    "Controlled NumPy 2.5.4 / CPython 3.12.3 observations use synthetic numeric arrays and BytesIO, not physical media, mmap or a corruption-rate sample.",
    "Reproduction: https://hesela.dev/research/npy-interpretation/reproduction.zip"
  ]
}
