Skip to content

Implement lshift and rshift operators #7727

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

Closed
abrammer opened this issue Apr 5, 2023 · 1 comment · Fixed by #7741
Closed

Implement lshift and rshift operators #7727

abrammer opened this issue Apr 5, 2023 · 1 comment · Fixed by #7741

Comments

@abrammer
Copy link
Contributor

abrammer commented Apr 5, 2023

Is your feature request related to a problem?

I've noticed that xarray does not support the lshift or rshift operators. While this is workable by using the numpy array the addition of the operators also seem somewhat trivial and reduces friction for numpy users adopting xarray.

Is the exclusion of these operators intentional or oversight or some other historic reason?

Describe the solution you'd like

Implement the operators if it makes sense.

Describe alternatives you've considered

No response

Additional context

I experimented with the potential edits here: https://github.com/abrammer/xarray/tree/feat/add_lshift_and_rshift_operators
but don't want to open a PR without an initial discussion. I haven't delved into this area of xarray before so I probably missed something or did something wrong.

@dcherian
Copy link
Contributor

dcherian commented Apr 6, 2023

I think we would gladly take a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants