Providing Public Cython API within NumPy
See original GitHub issueWould it make sense for NumPy to provide numpy.pxd
and numpy/math.pxd
(currently included in Cython)?
Given NumPy already ships SWIG bindings, providing Cython bindings seems reasonable and is not too different in concept. Plus there are already internal consumers of Cython bindings, which would likely benefit from having access to a single public API. Would add that other projects like SciPy have been adding a fair number of things in *.pxd
files included in their public API making this a bit of a trend. This would certainly help build a framework for NumPy to expose other things in the public API. Finally would note that having the Cython bindings live in Cython complicates the process of keeping them up-to-date as they must provide support for various versions of NumPy, which should hopefully be less of a problem if Cython bindings were included in NumPy’s public API.
Thoughts on this would be welcome. 😃
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:7 (7 by maintainers)
Makes sense I think. The Cython wrappers in SciPy have been popular and unproblematic.
This came up again recently in regards to whether certain NumPy functions require the GIL and whether that is reflected correctly in the Cython API. ( https://github.com/cython/cython/issues/2663 )
Side note: Some questions were raised regarding documentation of GIL use in NumPy’s C API as well.