Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

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

@charris 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 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.

2 participants