New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow empty index for scatter_* methods #14077
Conversation
torch/_tensor_docs.py
Outdated
@@ -2008,7 +2008,8 @@ def callable(a, b) -> number | |||
|
|||
Args: | |||
dim (int): the axis along which to index | |||
index (LongTensor): the indices of elements to scatter | |||
index (LongTensor): the indices of elements to scatter, can be either empty or | |||
the same size of `src` |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ailzhang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ailzhang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Fixes #2027 Pull Request resolved: pytorch/pytorch#14077 Differential Revision: D13095788 Pulled By: ailzhang fbshipit-source-id: ad2c8bbf83d36e07940782b9206fbdcde8905fd3
Fixes #2027