index op• 資料種類:indices → labels
• 呼叫: import fullseye as fs; fs.ledger.indices_to_labels(indices)(要直接呼叫實作,import reprconv; reprconv.indices_to_labels(indices);從台帳取用則 opsreprconv.get("indices_to_labels"))
索引 (N,) → 選擇遮罩 labels。indices 的出口(可逆)。
建構長度為 max(indices) + 1 的 1-D 標籤陣列,在選中的位置放 1。indices -> labels -> indices 逐位元一致(除去重複與順序)。反方向 labels -> indices -> labels 會丟掉末尾的背景 (長度被截為 max_index + 1)—— 這是資訊的損失而不是 bug,所以在 labels_to_indices 的 docstring 中寫明了量。
Args:
indices: (N,) 的非負整數陣列。
Returns:
(max + 1,) 的 int64 標籤陣列(選中 = 1,背景 = 0)。
Raises:
ValueError: 不是 1-D / 負 / 空 / 超過上限。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者、年份)與用途見上面的族使用指南。
• representation_conversion — py -3.11 examples/representation_conversion.py
labels 作為輸入)index)labels_to_indices · select_points
*Provenance: reprconv.py — REPRCONV 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.