indices_to_labels — REPRCONV index op

• Data kinds: indices → labels

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

Usage

Indices (N,) → a selection mask labels. The exit from indices (invertible).

Builds a 1-D label array of length max(indices) + 1 and puts 1 at the selected positions. indices -> labels -> indices is bit-identical (apart from duplicates and order). The reverse labels -> indices -> labels drops the trailing background (the length is truncated to max_index + 1) -- this is a loss of information, not a bug, so the amount is written in the docstring of labels_to_indices.

Args:

indices: (N,) non-negative integer array.

Returns:

(max + 1,) int64 label array (selected = 1, background = 0).

Raises:

ValueError: not 1-D / negative / empty / exceeds the limit.

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 labels as input)

labels_to_indices

Same category (index)

labels_to_indices · select_points


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