Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: use PyArray_SafeCast in array_astype #26332

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

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

charris
Copy link
Member

@charris charris commented Apr 23, 2024

Backport of #26317.

I noticed today that passing a distinct StringDType instance to astype wasn't sufficient to actually change the dtype with copy=False. This fixes that issue by using PyArray_SafeCast instead of PyArray_EquivTypes.

See #26147 which introduced PyArray_SafeCast and fixed a similar issue.

@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Apr 23, 2024
@charris charris added this to the 2.0.0 release milestone Apr 23, 2024
@charris charris merged commit 367a733 into numpy:maintenance/2.0.x Apr 23, 2024
@charris charris deleted the backport-26317 branch April 23, 2024 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.