e3x.ops.indexed.dense_to_sparse_indices
- e3x.ops.indexed.dense_to_sparse_indices(adj_idx, pad_idx=None)[source]
Converts a dense index list to a sparse index list.
Note: Not compatible with
jax.jitorjax.vmapbecause boolean arrays are not concrete.- Parameters:
adj_idx (
<class 'Integer[Array, '... N M']'>) – Adjcency indices.pad_idx (
Optional[int], default:None) – All indices >=pad_idxare assumed to be padding. If this isNone, all indices are assumed to be non-padding entries.
- Return type:
- Returns:
The corresponding sparse index list returned as a tuple
(dst_idx, src_idx)with destination and source indices, respectively.