unravel_index#
- iskra.sparse.unravel_index(linear: Tensor, shape: Size | tuple[int, ...]) Tensor[SOURCE]#
Converts a linear index into COO indices.
See also
This function does the opposite of
ravel_indices(). See for more information.- Parameters:
linear (
Tensor[nnz]) – Linear indices into a strided layout tensor.shape (torch.Size | tuple[int, ...]) – Shape of the tensor.
- Returns:
(
Tensor[dim, nnz]) – Indices of a sparse tensor in COO format of same shape.