FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MAINT,TYP: Add object-overloads for the ``np.generic`` rich comparisons by charris · Pull Request #22034 · numpy/numpy · GitHub

/ numpy Public

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

Merged
charris merged 1 commit into
numpy:maintenance/1.23.xfrom
charris:backport-21984
Jul 24, 2022
Merged

charris merged 1 commit into
numpy:maintenance/1.23.xfrom
charris:backport-21984

Conversation

charris commented Jul 24, 2022

Copy link
Copy Markdown
Member

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 added this to the 1.23.2 release milestone Jul 24, 2022
charris closed this Jul 24, 2022
charris reopened this Jul 24, 2022
charris merged commit 71f271d into numpy:maintenance/1.23.x Jul 24, 2022
charris deleted the backport-21984 branch July 24, 2022 13:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL