isect_indices#

iskra.sparse.isect_indices(a_idx: Tensor, b_idx: Tensor) tuple[Tensor, Tensor][SOURCE]#

Checks which indices in two tensors apepar in both.

Assumes unique sets of indices in both function inputs.

Parameters:
  • a_idx (Tensor) – First set of indices to compare.

  • b_idx (Tensor) – Second set of indices to compare.

Returns:

(tuple[Tensor, Tensor]) – Masks (one per input), that are True if the index is repeated in the other tensor.