Skip to content

[Python] Possible follow-up on arithmetic support #49606

Description

@AlenkaF

Describe the enhancement requested

Basic arithmetic on arrays and scalars has been added here: #48085.

There are few things that we might work on as a follow-up in case there are requests/interest.

& / | operators and bool type

From #48085 (comment):

The & / | operators are currently mapped to the bitwise kernels, but in array-land, I think the most common use case for those is actually for logical (boolean) operations. So as a user, I would expect those to also work on bool type.

  • Newly added & / | operators are not working on boolean arrays/scalars due to kernels only supporting integer types,
  • Think about using logical kernels (pc.and_/pc.or_) if the input is bool.

Math-related dunder methods

We have moved math-related dunder methods out of the PR that added support for basic arithmetic:

These methods could also be supported if needed.

Component(s)

Python

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions