Skip to content

Add numpy 2.0 compatibility #235

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 5 commits into from
Aug 27, 2024

Conversation

zm711
Copy link
Contributor

@zm711 zm711 commented Jul 24, 2024

this is built off of #232

Since I don't know array wrapping perfectly I may need to tweak this again.

@zm711
Copy link
Contributor Author

zm711 commented Jul 24, 2024

So my fix, fixes old numpy but breaks new. Let me try again.

@zm711
Copy link
Contributor Author

zm711 commented Jul 24, 2024

@apdavison, both pre and post NumPy 2.0 tests are now passing on this PR.

@zm711 zm711 mentioned this pull request Jul 24, 2024
@axelande
Copy link

Any plans of including this PR and release a new version that is compatible with numpy2?

@apdavison
Copy link
Contributor

yes, I'm hoping to merge this and make a release during the coming week.

@apdavison apdavison merged commit bb96cbb into python-quantities:master Aug 27, 2024
44 checks passed
@zm711 zm711 deleted the numpy-2.0-compat branch August 27, 2024 12:24
JakobKai added a commit to JakobKai/python-quantities that referenced this pull request May 13, 2025
`quantities.Quantity.deepcopy` assumed that new objects copy the data
per defualt. This is no longer true since the adaptation to numpy 2
(python-quantities#235, commit: ed43021).
JakobKai added a commit to JakobKai/python-quantities that referenced this pull request May 13, 2025
`quantities.Quantity.deepcopy` assumed that new objects copy the data
per defualt. This is no longer true since the adaptation to numpy 2
(python-quantities#235, commit: ed43021).
@JakobKai JakobKai mentioned this pull request May 13, 2025
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.

4 participants