Skip to content
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

gh-163: full support of NumPy v2 #207

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

gh-163: full support of NumPy v2 #207

wants to merge 5 commits into from

Conversation

paddyroddy
Copy link
Member

@paddyroddy paddyroddy commented Sep 12, 2024

Fixes #163. Think the only change is required is np.trapz to np.trapezoid, verified with NPY201. Also fixes #189.

@paddyroddy paddyroddy added the infrastructure Project infrastructure: dev tools, packaging, etc. label Sep 12, 2024
@paddyroddy paddyroddy self-assigned this Sep 12, 2024
@paddyroddy paddyroddy marked this pull request as draft September 12, 2024 14:36
@paddyroddy
Copy link
Member Author

Have had to drop 3.8-3.9 support for full v2 support. Fixes #198.

@paddyroddy paddyroddy linked an issue Sep 12, 2024 that may be closed by this pull request
@paddyroddy paddyroddy marked this pull request as ready for review September 12, 2024 14:47
Copy link
Member

@Saransh-cpp Saransh-cpp 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! But should this be 2 PRs? Or at least should be 2 separate CHANGELOG notes (dropping Python versions should go in breaking changes?)?

@paddyroddy
Copy link
Member Author

Looks good! But should this be 2 PRs? Or at least should be 2 separate CHANGELOG notes (dropping Python versions should go in breaking changes?)?

Yeah I guess the Python changes (#198) should be done first, then NumPy. I hadn't realised they were necessary at the time.

@ntessore
Copy link
Collaborator

AFAICT, this would make numpy v2 required, not merely compatible without deprecations. I find that a bit of a strong requirement when the code works perfectly well with numpy<2 as well. Why not conditionally import trapezoid or trapz as trapezoid somewhere in our utility modules, then use that?

@paddyroddy
Copy link
Member Author

AFAICT, this would make numpy v2 required, not merely compatible without deprecations. I find that a bit of a strong requirement when the code works perfectly well with numpy<2 as well. Why not conditionally import trapezoid or trapz as trapezoid somewhere in our utility modules, then use that?

Yep, I had thought about that. I think this will become a piece of frustrating maintenance burden to be both API compatible, whilst still maintaining numpy<2. What do you think? Happy to do as you suggest, but I think it will quickly become a bit of a barrier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Project infrastructure: dev tools, packaging, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should we drop 3.8-3.9 support? Change dependencies to ~- syntax rather than >= NumPy 2 compatibility
3 participants