Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

BUG: fix deepcopying StringDType arrays#28643

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
seberg merged 1 commit intonumpy:mainfromngoldbaum:stringdtype-deepcopy
Apr 4, 2025

Conversation

ngoldbaum
Copy link
Member

@ngoldbaumngoldbaum commentedApr 3, 2025
edited
Loading

Fixes#28609

@ngoldbaum
Copy link
MemberAuthor

If anyone wants to make a fancy deepcopy traverse slot they can still do that in the future.

BTW, there's some discussion about long-term plans to make PyObject an opaque struct, which would make this sort of directmemcpy business no longer work. It's already a little questionable in the free-threaded build, since you're not supposed to move aPyMutex.

Copy link
Contributor

@mhvkmhvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good (and makes sense).

@seberg
Copy link
Member

seberg commentedApr 4, 2025
edited
Loading

Yes, agreed we don't have to solve the deepcopy of a custom dtype here. Thanks.

which would make this sort of direct memcpy business no longer work

Interesting, but we do need the size, no? In any-case, there are very few places we do that, and this isn't one of them. This just usesmemcpy on the pointer in case the original array is unaligned.
(Seems even for the output, which is unnecessary, but harmless.)

@sebergseberg merged commita342bf3 intonumpy:mainApr 4, 2025
71 of 73 checks passed
charris pushed a commit to charris/numpy that referenced this pull requestApr 5, 2025
@charrischarris removed the 09 - Backport-CandidatePRs tagged should be backported labelApr 5, 2025
charris pushed a commit to charris/numpy that referenced this pull requestApr 5, 2025
charris added a commit that referenced this pull requestApr 5, 2025
BUG: fix deepcopying StringDType arrays (#28643)
MaanasArora pushed a commit to MaanasArora/numpy that referenced this pull requestApr 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mhvkmhvkmhvk approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

BUG: Crash with copy.deepcopy when using StringDType
4 participants
@ngoldbaum@seberg@mhvk@charris

[8]ページ先頭

©2009-2025 Movatter.jp