Skip to content

Update output dtypes for bitwise shift operations #201

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

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Jun 14, 2021

This PR

  • updates the output dtypes for the bitwise shift operations to abide by type promotion. Current guidance requires that the output array have the same dtype as the first array argument. This PR changes that guidance to requiring type promotion and thus ensures consistency with other binary (i.e., 2-ary) elementwise functions.

@rgommers rgommers added the Maintenance Bug fix, typo fix, or general maintenance. label Jun 14, 2021
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, see pytorch/pytorch#59867. This was simply an inconsistency that was not noticed in the initial PR that added the bitwise_* functions. So I'll merge this as a bug fix. Thanks @kgryte

@rgommers rgommers merged commit 777bece into main Jun 14, 2021
@rgommers rgommers deleted the bitwise-shift-output-dtypes branch June 14, 2021 19:45
@kgryte kgryte mentioned this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Bug fix, typo fix, or general maintenance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants