Skip to content

Conversation

charris
Copy link
Member

@charris charris commented Jul 24, 2022

Backport of #21968.

Xref #21737

Allow all nin=1 ufuncs to accept objects implementing the __array_ufunc__ protocol.

The changes introduced herein should be extended to the nin=2 ufuncs as well, but this is substantially more difficult without regressing all np.ndarray output types to Any. Namely, we want to new overload to apply to all __array_ufunc__ implementations except np.ndarray, which is a bit of mess to do with the lack of some type of not-operator and the nin=2 input combinatorics.

@charris charris added 01 - Enhancement 08 - Backport Used to tag backport PRs labels Jul 24, 2022
@charris charris added this to the 1.23.2 release milestone Jul 24, 2022
@charris charris closed this Jul 24, 2022
@charris charris reopened this Jul 24, 2022
@charris charris merged commit 2714d8b into numpy:maintenance/1.23.x Jul 24, 2022
@charris charris deleted the backport-21968 branch July 24, 2022 03:40
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.

1 participant