spdl.io.NpzFile¶
- class NpzFile[source]¶
A class mimics the behavior of
numpy.lib.npyio.NpzFile.It is a thin wrapper around a zip archive, and implements
collections.abc.Mappinginterface.See
load_npz()for the usage.- Parameters:
data – The archive data to load.
meta – Metadata describing each archive entry.
max_uncompressed_bytes – Maximum cumulative declared uncompressed size of DEFLATE-compressed entries. Defaults to 1 GiB.
Added in version 0.7.0: The
max_uncompressed_bytesargument.Methods
get(k[,d])items()keys()values()- __getitem__(key: str) NDArray[source]¶
Provide dictionary-like access to array data.
One difference from the regular dictionary access is that it also supports accessing the item without
.npysuffix in the key. This matches the behavior ofnumpy.lib.npyio.NpzFile.