Skip to content
Novus Examples
npy136 B

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

Preview — schema + first 10 rowsnpy
FieldValue
dtypefloat64
descr in header<f8
shape()
fortran_orderFalse
elements1
Shape in header() — an empty tuple
Rank0, which is not the same as shape (1,)
Value6.62607015e-34 (the Planck constant, an exact SI value)
Data bytes8
Trapcode that does arr[0] raises IndexError on a rank-0 array
The header shape is the empty tuple '()' — parsers that expect at least one axis break here.

Specifications

Shape
() — rank 0
Elements
1
Data Bytes
8
Dtype
float64
Value
6.62607015e-34
Note
rank 0 is not the same as shape (1,)

Testing contract

Expected to pass
Scenario
Load the file and read its single value without indexing, then compare its rank against a shape-(1,) array.
Expected result
The shape parses as the empty tuple with ndim 0 and the value is 6.62607015e-34, while indexing with [0] raises an IndexError rather than returning the number.

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-Dimensional Scalar (.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 · 136 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.