Quickstart
Examples
Useful recipes and tricks
API reference
Generates a sparse index list for all pairs of num elements.
num
num (int) – Number of elements.
int
mask_self (bool, default: True) – Whether self-connections (loops) should be masked out.
bool
True
Union[Tuple[Integer[Array, '... num*(num-1)'], Integer[Array, '... num*(num-1)']], Tuple[Integer[Array, '... num**2'], Integer[Array, '... num**2']]]
A sparse index list specifying all pairs returned as a tuple (dst_idx, src_idx) with destination and source indices, respectively.
(dst_idx, src_idx)