-
Notifications
You must be signed in to change notification settings - Fork 26.3k
roll along multiple dimensions #13874
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
Conversation
|
@pytorch retest this please getting "RuntimeError: Address already in use" |
|
@pytorchbot retest this please still getting RuntimeError: Address already in use |
|
should the documentation be updated? |
ah, the existing documentation mostly covered this case "(int or tuple of ints)," but I updated to clarify this use case a bit. |
|
numpy.roll also allows an int shift to be used with a tuple axis, applying the same shift to all dimensions. This revision doesn't support that case, requiring shifts.size==dims.size unless dims==None |
gchanan
left a comment
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.
documentation update?
| auto tail_shifts = shifts.slice(1); | ||
| auto tail_dims = dims.slice(1); | ||
| auto first_dim_rolled = roll(self, shifts[0], dims[0]); | ||
| return roll(first_dim_rolled, tail_shifts, tail_dims); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
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.
@nairbv is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Pull Request resolved: pytorch/pytorch#13874 Differential Revision: D13223669 Pulled By: nairbv fbshipit-source-id: 1678d52529c326fa4a0614d0994b1820ad12bc04
No description provided.