npy
What is a .npy file?
application/x-npy
NPY is NumPy's native binary format for a single array. A short header records the dtype, shape, and memory order, followed by the raw array bytes, so an array round-trips exactly without any text parsing. It is the standard way to persist embeddings, tensors, and numeric matrices in the Python data stack.
How to use a .npy file
Use an example .npy to test array loaders (numpy.load), tensor and embedding pipelines, and converters between .npy, JSON, and columnar formats like Parquet.
Download example .npy files
- Text Embeddings — 24×16 matrix (NumPy .npy)The embeddings as a raw NumPy array — a 24×16 float32 matrix in .npy format, loadable with numpy.load. The binary twin of the JSON and Parquet files, for testing tensor and matrix loaders.
- Text Embeddings — 8-dim (NPY)NumPy matrix twin of the Wave F 8-dim embeddings.
- NumPy .npy — float64 2-D Grid (.npy)The baseline .npy fixture: a 12x8 float64 array in version 1.0 format with a little-endian descriptor and the header padded to the mandatory 64-byte alignment. Every other array in this family varies exactly one property away from it.
- NumPy .npy — float32 3-D Cube (.npy)The identical temperature field carried by the CF NetCDF and HDF5 fixtures, stored as a bare float32 .npy. Comparing the three shows exactly what a plain array container loses: the numbers survive, the units and axes do not.
- NumPy .npy — int16 Little-Endian (.npy)Nine int16 values including both type extremes, stored little-endian so the descriptor in the header reads '<i2'. It is one half of an endian pair whose values are identical and whose bytes are not.
- NumPy .npy — int16 Big-Endian (.npy)The same nine int16 values written big-endian, so the header descriptor reads '>i2'. A loader that ignores the descriptor and assumes native little-endian order returns 13330 where the file says 4660, without any error.
- NumPy .npy — float64 Big-Endian (.npy)Seven doubles written big-endian, including negative zero and values at both ends of the exponent range. Byte-swapping a double is unrecoverable by inspection — swap pi and you get 3.2e-192, which looks like a plausible tiny number rather than an error.
- NumPy .npy — Boolean Mask (.npy)A 6x10 boolean mask stored as one byte per element, because .npy does not bit-pack booleans however tempting that assumption is. The True cells follow a simple divisible-by-three rule so a mis-decode is obvious rather than plausible.
and 15 more in the library.