Skip to main content

Module npy

Module npy 

Source
Expand description

Reading and writing NumPy’s .npy and .npz container formats.

Only the dense numeric subset that WebDataset actually stores is supported: C-ordered arrays of the dtypes in DType. Fortran-ordered arrays, structured dtypes, and object arrays are rejected with a clear error.

Functions§

from_npy
Decode a .npy byte string into a Tensor.
read_npystd
Read a .npy array from a stream.
to_npy
Encode a Tensor as a version 1.0 .npy byte string.
write_npystd
Write a Tensor to out in version 1.0 .npy format.