Sparse operation in libtorch

I just want to do the below operation in libtorch but wouldn’t find any documentation or examples,
torch.sparse.FloatTensor(index, torch.ones(30), torch.Size([400,200,36])).to_dense()

Would you please direct me to the documentation or any example.

I think you want the sparse_coo_tensor function. In C++:

Tensor sparse_coo_tensor(const Tensor & indices, const Tensor & values, IntArrayRef size, const TensorOptions & options={});

Best regards