NumPy .npy — float16 at Its Limits (.npy)
Every structurally interesting float16 value in one array: one plus epsilon, the largest finite value, the smallest normal and subnormal, negative zero, infinity and a NaN. It is the compact half-precision counterpart to the float32 and float64 boundary fixtures.
| Index | Value | Why it is here |
|---|---|---|
| 2 | 1.0009765625 | 1 + eps for half precision (eps = 2^-10) |
| 3 | 65504.0 | largest finite float16 |
| 4 | 6.103515625e-05 | smallest normal float16 |
| 5 | 5.960464477539063e-08 | smallest subnormal float16 |
| 6 | -0.0 | negative zero |
| 7 | +Inf | anything above 65504 overflows to this |
| 8 | NaN | quiet NaN |
Specifications
- Dtype
- float16
- Elements
- 9
- Bytes Per Element
- 2
- Max Finite
- 65504
- Smallest Normal
- 0.00006103515625
- Smallest Subnormal
- 5.960464477539064e-8
- Includes Na N
- true
- Includes Inf
- true
- Includes Negative Zero
- true
Testing contract
Expected to pass- Scenario
- Load the array and classify each element as normal, subnormal, zero, infinite or NaN without widening to float32 first.
- Expected result
- Element 4 is the smallest normal and element 5 the smallest subnormal, element 6 is negative zero with a set sign bit, and exactly one element each is +Inf and NaN.
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 — float16 at Its Limits (.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 · 146 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.
Related files
- npyNumPy .npy — Zero-Dimensional Scalar (.npy)A rank-0 .npy holding a single double, whose header shape is the empty tuple rather than (1,). Indexing it with [0] raises rather than returning the value, so it separates parsers that model rank properly from parsers that assume at least one axis.

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

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

- binDICOM-Shaped Stream — No Preamble, No DICM Magic (.bin)The identical element stream with the 128-byte preamble and the DICM magic stripped, which is how DICOM often arrives out of a network transfer or a database blob column. It is not a conformant Part 10 file and its content is entirely recoverable, so a reader should fall back rather than reject.

- fitsFITS BLANK — Undefined Integer Pixels (.fits)Integer FITS images mark undefined pixels with the BLANK keyword, and BLANK is compared against the stored value before BZERO and BSCALE are applied. Scale first and the four undefined pixels turn into a perfectly plausible zero, which is the ordering bug this file exists to expose.

- fitsFITS Header-Only — Valid File With No Pixels (.fits)A completely valid FITS file consisting of one 2880-byte header block and no data unit, which the standard permits whenever NAXIS is 0. It separates readers that model the data array as optional from readers that treat 'no pixels' as corruption.

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