Skip to content
Novus Examples
npy320 B

float64 to float32 Precision Loss — Paired Array (.npy)

The precision-loss cases as a two-column float64 array holding the original value beside its float32 round trip, both kept at double width so the difference itself is representable. Subtracting the columns gives the error directly without a second narrowing step.

Preview — schema + first 6 rowsnpy
OriginalAfter float32 round tripSurvived?
0.10.10000000149011612no
0.33333333333333330.3333333432674408no
3.1415926535897933.1415927410125732no
16777217.016777216.0no
123456789.12345679123456792.0no
1e-409.99994610111476e-41no
Both columns are float64 so the DIFFERENCE is representable — that is the whole point.

Specifications

Dtype
float64
Shape
12 x 2
Column0
the original double
Column1
the value after a float32 round trip
Contains Infinity
true
Contains Subnormal
true

Testing contract

Reference control
Scenario
Load the array and subtract column 1 from column 0 to obtain the narrowing error for every case.
Expected result
The array is (12, 2) float64, the difference is exactly zero for the values that survive narrowing, and the 1e39 row yields -Inf because its round trip overflowed.

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

“float64 to float32 Precision Loss — Paired Array (.npy)” is a deterministic Novus Examples fixture for Scientific data, 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 · 320 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.