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

MAINT,TYP: Add object-overloads for the np.generic rich comparisons #22034

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

charris
Copy link
Member

@charris charris commented Jul 24, 2022

Backport of #21984.

Closes #21939

An overload was previously missing for object-based rich comparisons of the np.generic subclasses.

As object array-likes are notoriously difficult to type, the new overload simply checks whether the right operand supports __gt__ or __lt__ even though this will, in practice, be a bit too broad (e.g. it allows np.int64(1) > "test" to pass).

@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 71f271d into numpy:maintenance/1.23.x Jul 24, 2022
@charris charris deleted the backport-21984 branch July 24, 2022 13:08
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.

None yet

2 participants