NumPy .npy — Boolean Mask (.npy)
A 6x10 boolean mask stored as one byte per element, because .npy does not bit-pack booleans however tempting that assumption is. The True cells follow a simple divisible-by-three rule so a mis-decode is obvious rather than plausible.
| Field | Value |
|---|---|
| dtype | bool |
| descr in header | |b1 |
| shape | (6, 10) |
| fortran_order | False |
| elements | 60 |
| True elements | 20 |
| Storage | one byte per element — .npy does not bit-pack booleans |
| Legal byte values | 0x00 and 0x01 only |
| Rule | element is True where its flat index is divisible by 3 |
Specifications
- Dtype
- bool
- Shape
- 6 x 10
- True Count
- 20
- Bytes Per Element
- 1
- Descr
- |b1
- Note
- one byte per element, NOT a packed bit array
Testing contract
Expected to pass- Scenario
- Load the mask and count the True elements, then check the size of the data section that follows the header.
- Expected result
- Exactly 20 of the 60 elements are True, the data section is 60 bytes long, and every data byte is 0x00 or 0x01.
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 — Boolean Mask (.npy)” is a deterministic Novus Examples fixture for Scientific data, Serialization testing. 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 · 188 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 — 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.

- npyNumPy .npy — float64 2-D Grid (.npy)The baseline .npy fixture: a 12x8 float64 array in version 1.0 format with a little-endian descriptor and the header padded to the mandatory 64-byte alignment. Every other array in this family varies exactly one property away from it.

- npyNumPy .npy — float64 Big-Endian (.npy)Seven doubles written big-endian, including negative zero and values at both ends of the exponent range. Byte-swapping a double is unrecoverable by inspection — swap pi and you get 3.2e-192, which looks like a plausible tiny number rather than an error.

- npyNumPy .npy — Fortran Order (Column-Major) (.npy)The same 4x6 matrix stored column-major with fortran_order set to True in the header. Ignoring that one boolean does not produce an error, it produces a transposed matrix — the quietest failure in the whole .npy format.

- npyNumPy .npy — int16 Big-Endian (.npy)The same nine int16 values written big-endian, so the header descriptor reads '>i2'. A loader that ignores the descriptor and assumes native little-endian order returns 13330 where the file says 4660, without any error.

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