jax.experimental.sparse.bcoo_extract# jax.experimental.sparse.bcoo_extract(sparr, arr, *, assume_unique=None)[源代码]# 根据稀疏数组的索引从密集数组中提取值。 参数: sparr (BCOO) – 将使用其索引来生成输出的 BCOO 数组。 arr (ArrayLike) – 形状与 self.shape 相等的 ArrayLike。 assume_unique (bool | None) – bool,默认为 sparr.unique_indices。如果为 True,即使索引包含重复项,也会提取每个索引的值。如果为 False,则将对重复索引的值求和,并在第一个索引的位置返回。 返回: 一个具有与 self 相同稀疏模式的 BCOO 数组。 返回类型: extracted