{
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-24",
  "advantages": [],
  "slug": "npy",
  "term": "NumPy NPY format",
  "aliases": [
    ".npy",
    "NPY"
  ],
  "definition": "NPY is NumPy's binary format for storing one array with a header describing its data type, shape and storage order.",
  "note": "The numeric payload is interpreted using the header; a digest of payload bytes alone does not bind the array's shape, byte order or coordinate assignment. NPY format versions and NumPy library versions are different identifiers. [npy-format]\n\nAdditional dtype metadata is removed during serialization by the reviewed NumPy 2.5.4 implementation, with a warning. An application-supplied unit in dtype.metadata is not a preserved NPY field. [numpy-format-source] [numpy-drop-metadata]\n\nSuccessive NPY records can share a file object, so an application must define whether it expects exactly one record or a sequence. [numpy-save]\n\nNPY does not guarantee preservation of arbitrary ndarray subclass identity, behavior or extra attributes; the ordinary non-pickled array path reconstructs a regular ndarray. This is a documented limitation, separate from the numeric-array observations. [npy-format]",
  "related": [
    "npz",
    "checksum",
    "file-storage"
  ],
  "limitations": [
    "NPY stores contiguous C- or Fortran-order array data, not an arbitrary in-memory view's strides. [npy-format]",
    "allow_pickle=False governs object-array loading, not end-to-end integrity or intended scientific meaning. [numpy-load]",
    "Preserve application semantics such as units and axis identity in an explicit schema bound to the accepted data."
  ],
  "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-load",
      "title": "NumPy load API",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.load.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "numpy-save",
      "title": "NumPy save API: successive array records",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.save.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "numpy-format-source",
      "title": "NumPy 2.5.4 pinned format implementation",
      "url": "https://github.com/numpy/numpy/blob/a3d0ef1df045b858e68115001fdabc930bb3b68c/numpy/lib/_format_impl.py",
      "accessed": "2026-10-24"
    },
    {
      "id": "numpy-drop-metadata",
      "title": "NumPy drop_metadata: np.save and np.savez omit additional dtype metadata",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.lib.format.drop_metadata.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"
  ]
}
