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

[ENH] Deprecate numpy/math.pxd #6449

Open
scoder opened this issue Oct 24, 2024 · 1 comment
Open

[ENH] Deprecate numpy/math.pxd #6449

scoder opened this issue Oct 24, 2024 · 1 comment
Labels
Milestone

Comments

@scoder
Copy link
Contributor

scoder commented Oct 24, 2024

Coming from #5967 (comment):

numpy/math.pxd is a relict that we should not maintain and NumPy doesn't want.

The numpy header doesn't do much special on top of libc.math, so we should first migrate all declarations in numpy/math.pxd to use libc's math.h instead, except for the few that come directly from NumPy. Cython would still include both header files if people cimport from the pxd, so it doesn't help much in terms of removing NumPy dependencies, but it would at least make it clear that users are probably better off with libc.math directly.

I'd then also add a clear C warning, as @jakirkham suggested in #5967. That seems fine for Cython 3.1, which intentionally drops old cruft and asks users to migrate.

@scoder scoder changed the title If the numpy header doesn't do anything special on top of libc.math, then I'd first migrate all declarations in numpy/math.pxd to use libc's math.h instead, except for the few that come directly from NumPy. Cython would still include both header files if people cimport from the pxd, so it doesn't help much, but it would at least make it clear that users are probably better off with libc.math directly. [ENH] Deprecate numpy/math.pxd Oct 24, 2024
@scoder scoder added this to the 3.1 milestone Oct 24, 2024
@scoder scoder added the cleanup label Oct 24, 2024
@jakirkham
Copy link
Contributor

Linking relevant PRs:

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

No branches or pull requests

2 participants