indices_to_labels — REPRCONV index op

Data kinds: indiceslabels

Call: import reprconv; reprconv.indices_to_labels(indices) (or opsreprconv.get("indices_to_labels"))

Usage

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

> The detailed description below is the original text — the summary and the headings are translated.

`max(indices) + 1` 長の 1-D ラベル配列を作り、選ばれた位置に 1 を置く。

`indices -> labels -> indices` は bit 一致(重複と順序を除く)。

逆向き `labels -> indices -> labels` は末尾の背景を落とす

(長さが `max_index + 1` に切り詰まる)—— これは情報の損失であって

バグではないので、:func:labels_to_indices の docstring に量を書いてある。

Args:

indices: (N,) の非負整数配列。

Returns:

(max + 1,) の int64 ラベル配列(選択 = 1、背景 = 0)。

Raises:

ValueError: 1-D でない / 負 / 空 / 上限超。

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