{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A dictionary-like object with lazy-loading of files in the zipped archive provided on construction."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "files",
              "annotation": "list of str",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "List of all files in the archive with a "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": ".npy"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " extension."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "zip",
              "annotation": "ZipFile instance",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The ZipFile object initialized with the zipped archive."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "f",
              "annotation": "BagObj instance",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "An object on which attribute can be performed as an alternative to getitem access on the "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "NpzFile",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "numpy.lib.npyio:NpzFile"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " instance itself."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "allow_pickle",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Allow loading pickled data. Default: False"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "pickle_kwargs",
              "annotation": "dict, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Additional keyword arguments to pass on to pickle.load. These are only useful when loading object arrays saved on Python 2."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "max_header_size",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Maximum allowed size of the header.  Large headers may not be safe to load securely and thus require explicitly passing a larger value. See "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "ast.literal_eval()",
                      "domain": "py",
                      "role": "func",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " for details. This option is ignored when "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "allow_pickle",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": null,
                        "version": null,
                        "kind": "local",
                        "path": "allow_pickle"
                      },
                      "kind": "local"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is passed.  In that case the file is by definition trusted and the limit is unnecessary."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "fid",
              "annotation": "file, str, or pathlib.Path",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The zipped archive to open. This is either a file-like object or a string containing the path to the archive."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "own_fid",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Whether NpzFile should close the file handle. Requires that "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "fid"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a file-like object."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "NpzFile",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "numpy.lib.npyio:NpzFile"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is used to load files in the NumPy "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": ".npz"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " data archive format. It assumes that files in the archive have a "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": ".npy"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " extension, other files are ignored."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The arrays and file strings are lazily loaded on either getitem access using "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "obj['key']"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " or attribute lookup using "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "obj.f.key"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". A list of all files (without "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": ".npy"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " extensions) can be obtained with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "obj.files"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and the ZipFile object itself using "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "obj.zip"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/numpy/lib/npyio.py",
  "item_line": null,
  "item_type": "ABCMeta",
  "aliases": [
    "numpy.lib._npyio_impl.NpzFile"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nfrom tempfile import TemporaryFile\noutfile = TemporaryFile()\nx = np.arange(10)\ny = np.sin(x)\nnp.savez(outfile, x=x, y=y)\n_ = outfile.seek(0)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "npz = np.load(outfile)\nisinstance(npz, np.lib.npyio.NpzFile)\nnpz\nsorted(npz.files)\nnpz['x']  # getitem access\nnpz.f.x  # attribute lookup\n",
        "execution_status": "success"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "fid",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "NpzFile"
  },
  "references": null,
  "qa": "numpy.lib.npyio:NpzFile",
  "arbitrary": [],
  "local_refs": [
    "allow_pickle",
    "f",
    "fid",
    "files",
    "max_header_size",
    "own_fid",
    "pickle_kwargs",
    "zip"
  ]
}