Skip to content
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

New operators: bitwise int operations #346

Open
ianspektor opened this issue Jan 17, 2024 · 3 comments · May be fixed by #417
Open

New operators: bitwise int operations #346

ianspektor opened this issue Jan 17, 2024 · 3 comments · May be fixed by #417
Assignees
Labels
good first issue Good for newcomers new operator Development of a new operator.

Comments

@ianspektor
Copy link
Collaborator

ianspektor commented Jan 17, 2024

New EventSet.and(), EventSet.or(), EventSet.xor(), EventSet.invert(), EventSet.left_shift(), EventSet.right_shift() operators that implement bitwise operations on integer types, with their corresponding magics: &, |, ^, ~, <<, >>.

and() and or() and invert() are already implemented for bool and need to be extended to work with ints.

Implementation should be factored with base classes so that each operation only needs to define the numpy method it needs to call.

See https://github.com/google/temporian/blob/main/CONTRIBUTING.md#developing-a-new-operator for guidance.

Questions or requests for additional guidance from possible contributors more than welcome!

@ianspektor ianspektor added good first issue Good for newcomers new operator Development of a new operator. labels Jan 17, 2024
@saneens
Copy link

saneens commented Feb 29, 2024

I would like to take this up. Could you please assign this to me, @ianspektor?

@ianspektor
Copy link
Collaborator Author

Hey @saneens! For sure. I see you've just joined our Discord too, feel free to create a thread in #contributing to discuss doubts or get additional help. Thanks!

@ianspektor
Copy link
Collaborator Author

See how and, or and xor are implemented in temporian/core/operators/binary/logical.py and temporian/implementation/numpy/operators/binary/logical.py, these should be implemented with a similar structure.

@saneens saneens linked a pull request Apr 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers new operator Development of a new operator.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants