Skip to content

Conversation

@charris
Copy link
Member

@charris charris commented Mar 29, 2024

Backport of #26116.

I couldn't quite stand how we are working around not having abstract dtypes by adding weird promotors in #26105, so thought one should just make them, especially since (as I found out) all the basic infrastructure is there.

So, this let's all numerical legacy dtypes inherit from the abstract types defined for python int, float and complex. This follows what was mentioned to be the plan all along in the comments in abstractdtype, though it does not yet change the names throughout, since I wanted to be sure first I'm not barking up the wrong tree (it took the better part of the day already, mostly to realize that the abstract dtypes better inherit from PyArrayDescr_Type, otherwise nothing works).

Anyway, with this, the StringDType multiplication promotors are now their logical selves, the work-around can be removed, and everything works.

@charris charris added this to the 2.0.0 release milestone Mar 29, 2024
@charris charris merged commit 7586852 into numpy:maintenance/2.0.x Mar 29, 2024
@charris charris deleted the backport-26116 branch March 29, 2024 17:26
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.

3 participants