index op• 数据种类:indices → labels
• 调用:import reprconv; reprconv.indices_to_labels(indices)(或 opsreprconv.get("indices_to_labels"))
索引 `(N,) → 选择掩码 labels。indices` 的出口(可逆)。
> 以下的详细说明为原文 —— 摘要与标题已翻译。
`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 でない / 負 / 空 / 上限超。
• 示例数据目录(下载 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.