Skip to content
Testaroo
mtx181 B

Matrix Market: Zero Stored Entries, Still Valid (.mtx)

A valid Matrix Market file describing a 6x6 matrix with no stored entries, which is an all-zero matrix rather than an error. It separates readers that model an empty result from readers that treat a missing entry block as truncation.

Preview, first 5 linesmtx
%%MatrixMarket matrix coordinate real general
% A completely legal matrix with no stored entries at all.
% The size line is present; there are simply no entry lines after it.
6 6 0

Specifications

Rows
6
Columns
6
Non Zeros
0
Entry Lines
0
Valid
true
Shape
6 x 6 all-zero matrix
Common Bug
reported as a truncated or empty file

Testing contract

Expected to pass
Scenario
Load the file and report the matrix shape and its number of stored entries.
Expected result
The load succeeds returning a 6x6 matrix with zero stored entries and no exception, rather than an empty or zero-by-zero result.

What is a .mtx file?

Matrix Market (.mtx) is a plain-text exchange format for sparse and dense matrices from NIST. A banner line declares the object, format, field, and symmetry, for example `%%MatrixMarket matrix coordinate real general`, comment lines follow, and then a size line gives rows, columns, and the number of stored entries. Coordinate entries list a 1-based row, a 1-based column, and a value, with symmetric matrices storing only the lower triangle.

How to use this file

Use an example .mtx file to test sparse-matrix loaders and numerical pipelines, verifying 1-based to 0-based index conversion, correct expansion of symmetric and pattern matrices, and that the declared entry count matches the data.

How to use this file for testing

“Matrix Market: Zero Stored Entries, Still Valid (.mtx)” is a deterministic Testaroo fixture for Scientific data, Editor 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: 6 rows · 6 columns. 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.