Skip to content
Novus Examples
npy128 B

NumPy .npy — Zero-Length Array With Real Shape (.npy)

A valid .npy file with a full header, a declared (0, 4) shape and a data section of zero bytes. It preserves the column count across an empty result, and it separates readers that model emptiness from readers that treat it as failure.

Preview — schema + first 9 rowsnpy
FieldValue
dtypefloat64
descr in header<f8
shape(0, 4)
fortran_orderTrue
elements0
Data section0 bytes — the file is header only
Shape(0, 4) — the column count survives even with no rows
Validitycompletely valid .npy, not an empty file
Trapreaders that require at least one element reject it
Zero rows, four columns: the shape carries information the data cannot.

Specifications

Shape
0 x 4
Elements
0
Data Bytes
0
Dtype
float64
Valid
true
Header Still Present
true

Testing contract

Expected to pass
Scenario
Load the file and inspect its shape and dtype without assuming any elements exist.
Expected result
The load succeeds returning shape (0, 4) with dtype float64 and zero elements, and the file size equals the header size exactly.

What is a .npy file?

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 this 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.

How to use this file for testing

“NumPy .npy — Zero-Length Array With Real Shape (.npy)” is a deterministic Novus Examples fixture for Scientific data, Serialization testing, Error handling. Citation catalogs (BibTeX, RIS), chemistry structures (MDL Molfile, PDB), and gridded binary data (NetCDF, FITS) — for testing reference managers, molecule viewers, and scientific-data loaders.

Documented properties for this file: NPY · 128 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Scientific fixtures are small, valid, and fully synthetic — no real organism, patient, sample, or observation. Point your parser or loader at the file and check it reads the documented records, variables, or headers; binary formats ship a readable twin or metadata listing for comparison.

Generated by generation/scientific.py. Free for any use, no attribution required — license.