matrix_to_descriptor — REPRCONV descriptor op

• Data kinds: matrix → descriptor

• Call: import fullseye as fs; fs.ledger.matrix_to_descriptor(matrix) (to call the implementation directly, import reprconv; reprconv.matrix_to_descriptor(matrix); from the registry, opsreprconv.get("matrix_to_descriptor"))

Usage

matrix → descriptor. The inverse of descriptor_to_matrix.

A 1-row matrix (1, n) goes back to (n,) (because that is the original 1-D descriptor). 2 or more rows pass unchanged. This asymmetry is intentional: without it, the round trip descriptor -> matrix -> descriptor would silently change shape from (n,) to (1,n) = a type lie in its purest form.

★ An irreversible point that is measured and kept: in exchange, a descriptor that was originally a 2-D (1, n) becomes a 1-D (n,) after the round trip -- a (1,n) matrix has no way to distinguish "a wrapped 1-D descriptor" from "a descriptor bundle with only 1 row", so this 1 case alone cannot in principle be restored. All values are kept, so the loss is only the meta-information "there was 1 row". Forced to choose which side becomes irreversible, the overwhelming majority of descriptor (measured: 12 of 14 producers are 1-D) was put on the exact side. tests/test_reprconv.py::test_one_row_descriptor_ambiguity_is_documented pins this hole without plugging it (hide it, and one day the shape will silently change).

Args:

matrix: (m, n) real array.

Returns:

(n,) if m == 1, otherwise (m, n).

Raises:

ValueError: not 2-D / non-finite.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• representation_conversion — py -3.11 examples/representation_conversion.py

Ops the type connects to (they accept descriptor as input)

descriptor_to_matrix · descriptor_to_table

Same category (descriptor)

descriptor_to_matrix · descriptor_to_table


*Provenance: reprconv.py — REPRCONV operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.