Skip to content

ENH: Add dtype-support to the ufunc-based ndarray magic methods 2/4#18228

Merged
charris merged 4 commits intonumpy:masterfrom
BvB93:comparison3
Feb 1, 2021
Merged

ENH: Add dtype-support to the ufunc-based ndarray magic methods 2/4#18228
charris merged 4 commits intonumpy:masterfrom
BvB93:comparison3

Conversation

@BvB93
Copy link
Member

@BvB93 BvB93 commented Jan 25, 2021

Followup on #18128.

Second part in a series of PRs to add dtype-support to the (ufunc-based) ndarray magic methods.

Most of the newly introduced overloads are based on the respective ufunc's types attribute.
Note that support for number precision is neglected herein, as this would require knowledge of the
arrays and/or array-likes dimensionality (i.e. the identification of 0d + nd operations, which is too difficult).

The updated methods in question are:

  • __abs__
  • __invert__
  • __pos__
  • __neg__
  • __matmul__
  • __rmatmul__
  • __mod__
  • __rmod__
  • __divmod__
  • __rdivmod__
  • __add__
  • __radd__
  • __sub__
  • __rsub__
  • __mul__
  • __rmul__

@charris
Copy link
Member

charris commented Feb 1, 2021

Thanks Bas.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants