Add lshift and rshift operators#7741
Merged
dcherian merged 21 commits intopydata:mainfrom Apr 28, 2023
Merged
Conversation
Contributor
Grepping for |
Contributor
|
I forgot to say, this looks pretty great already. We just need tests. Thank you! |
Illviljan
reviewed
Apr 21, 2023
Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>
Type checking throws errors on existing test lines
4 tasks
dcherian
reviewed
Apr 24, 2023
dcherian
reviewed
Apr 24, 2023
for more information, see https://pre-commit.ci
Example use in computation.rst and entry in whats-new
for more information, see https://pre-commit.ci
Contributor
Author
|
The commits yesterday were to add an entry to whats-new and a couple examples lines to the computation doc page. I didn't find the binary_ops listed in methods anywhere, so this was the best idea I had? In the block just above missing-values: https://xray--7741.org.readthedocs.build/en/7741/user-guide/computation.html#missing-values Otherwise, I think this is done from my perspective. |
Contributor
|
Thanks @abrammer very nice work! |
dcherian
added a commit
to dcherian/xarray
that referenced
this pull request
May 6, 2023
* main: Introduce Grouper objects internally (pydata#7561) [skip-ci] Add cftime groupby, resample benchmarks (pydata#7795) Fix groupby binary ops when grouped array is subset relative to other (pydata#7798) adjust the deprecation policy for python (pydata#7793) [pre-commit.ci] pre-commit autoupdate (pydata#7803) Allow the label run-upstream to run upstream CI (pydata#7787) Update asv links in contributing guide (pydata#7801) Implement DataArray.to_dask_dataframe() (pydata#7635) `ds.to_dict` with data as arrays, not lists (pydata#7739) Add lshift and rshift operators (pydata#7741) Use canonical name for set_horizonalalignment over alias set_ha (pydata#7786) Remove pandas<2 pin (pydata#7785) [pre-commit.ci] pre-commit autoupdate (pydata#7783)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This seems a little too easy, but the PR just adds lshift and rshit to
generate_ops.pyandops.pythen generated the 2 stub files withgenerate_ops.py.whats-new.rst<<>>syntax for dataarrays and datasets.api.rstI'll wait for initial review before spending time on whats-new and api docs.
This enables bit shifting on arrays (when the type supports it).