Update documentation for torch.index_select (#163616)

Description said "entries in index which is a LongTensor" but index_select can accept an IntTensor as the parameter
Pull Request resolved: https://github.com/pytorch/pytorch/pull/163616
Approved by: https://github.com/jbschlosser

Co-authored-by: Joel Schlosser <75754324+jbschlosser@users.noreply.github.com>
This commit is contained in:
catswe
2025-09-25 18:29:12 +00:00
committed by PyTorch MergeBot
parent b61bdc7cc4
commit 151e66e50d

View File

@ -5308,7 +5308,7 @@ add_docstr(
index_select(input, dim, index, *, out=None) -> Tensor
Returns a new tensor which indexes the :attr:`input` tensor along dimension
:attr:`dim` using the entries in :attr:`index` which is a `LongTensor`.
:attr:`dim` using the entries in :attr:`index`.
The returned tensor has the same number of dimensions as the original tensor
(:attr:`input`). The :attr:`dim`\ th dimension has the same size as the length