Skip to content

MAINT: Replace setting of array shape by reshape operation #29314

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 4 commits into from
Jul 31, 2025

Conversation

eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented Jul 3, 2025

Addresses part of #28800.

In this PR we replace some explicit setting of the shape of an array in favor of using reshape. Some cases are left out (e.g. masked arrays, tests to check the .shape setting works).

In followup PRs the remaining cases will be handled and the shape setting deprecated.

@eendebakpt eendebakpt marked this pull request as draft July 3, 2025 20:13
@eendebakpt eendebakpt marked this pull request as ready for review July 3, 2025 21:30
@eendebakpt eendebakpt changed the title MAIN: Replace setting of array shape by reshape operation MAINT: Replace setting of array shape by reshape operation Jul 9, 2025
@eendebakpt eendebakpt requested a review from ngoldbaum July 27, 2025 20:31
Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

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

Thanks, nice cleanup @eendebakpt and even better if it helps with the deprecation :).

@seberg seberg merged commit a805425 into numpy:main Jul 31, 2025
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants