NumPy .npy: Structured Record Array with Units in Field Names (.npy)
A 16-record structured array carrying a value, its uncertainty and a quality flag, with the physical unit encoded in the field-name suffix because .npy has nowhere else to put it. The header descriptor is a list of field tuples rather than a single type string, which is the parsing branch this file exercises.
| Field | dtype | Offset | Meaning |
|---|---|---|---|
| station | int32 | 0 | synthetic station index |
| temperature_K | float64 | 4 | value in kelvin |
| u_temperature_K | float64 | 12 | standard uncertainty, kelvin |
| quality | uint8 | 20 | 0 = good, 2 = suspect |
Specifications
- Records
- 16
- Fields
- 4
- Itemsize
- 21
- Field Names
- station, temperature_K, u_temperature_K, quality
- Units Convention
- encoded in the field name suffix
- Seed
- 20260830
Testing contract
Expected to pass- Scenario
- Parse the header descriptor as a structured dtype and read each named field with its declared offset.
- Expected result
- The descr parses to four fields with an item size of 21 bytes, u_temperature_K is 0.05 for every record, and quality is 2 on exactly the records whose index is divisible by five.
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: Structured Record Array with Units in Field Names (.npy)” is a deterministic Testaroo fixture for Scientific data, Serialization testing, Data import. 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: seed 20260830 · 16 records · 4 fields. 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.
Related files
- fitsFITS BINTABLE: Typed Columns with TUNIT (.fits)A FITS binary table with four typed columns, big-endian numerics packed with no inter-field padding and TUNIT declaring milli-jansky on the two flux columns. It is the fixture for a table reader that has to build a row struct from TFORM codes rather than guess widths.

- h5HDF5 Compound Record dtype: Mixed Field Types (.h5)A compound-dtype dataset mixing an integer key, two float measurements, a fixed-width byte string and a boolean flag in a single record. It is the fixture for readers that must map an HDF5 record type onto a native struct without reordering or repadding the fields.

- npyNumPy .npy Format Version 2.0: Header Beyond 64 KiB (.npy)A 300-field structured array whose descriptor is too long for a version 1.0 header, forcing format version 2.0 and its four-byte header-length field. A hand-rolled parser that assumes the two-byte 1.0 field mis-locates the data section entirely.

- npyNumPy .npy Format Version 3.0: UTF-8 Field Names (.npy)A structured array whose field names use Greek and CJK characters, which is the only reason format version 3.0 exists: its header is UTF-8 where 1.0 and 2.0 are latin-1. A parser that decodes the header as latin-1 mangles all three names.

- npyNumPy .npy: C Order (Row-Major) (.npy)A 4x6 matrix of 0..23 stored row-major, so the byte sequence begins with the first row. It is one half of a memory-order pair that is indistinguishable from its twin unless the header's fortran_order flag is honoured.

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