Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: use PyArray_SafeCast in array_astype #26317

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 20, 2024

Conversation

ngoldbaum
Copy link
Member

@ngoldbaum ngoldbaum commented Apr 19, 2024

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.

@ngoldbaum ngoldbaum added 00 - Bug 09 - Backport-Candidate PRs tagged should be backported labels Apr 19, 2024
@charris charris merged commit 28a3cb3 into numpy:main Apr 20, 2024
@charris
Copy link
Member

charris commented Apr 20, 2024

Thanks Nathan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants