-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
TST. API: test using distributions.h via cffi #14954
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
Conversation
I also made sure the numba test passes locally on windows. Numba is a bit heavy and moving too fast to be a permanent test dependency. I don't think they have released a Python3.8 version yet. |
The test failure seems unrelated - matmul is seeing an invalid value on win32. I think this is a different manifestation of the occasional heisenbug. |
A very heavy handed approach to make these available for Cython through _generator. binary would be to use wrap the functions and use the |
The solutions I see in the cython documentation do seem rather heavy-handed. We expose the functions from python, but as you say that requires the Python->C-API->call the function->C-API->Python route. Maybe we should delay extending the API for now? |
It looks like the only "easy" and universal method is to compile the functions into distributions.lib or libdistributions.so like npymath.lib. This would allow downstream Cython to link to these functions, and if they want to use Numba, a downstream could create a dll from the subset of the lib they need. Of course, not really easy. |
Or ship numpy/random/scr/distributions/distributions.c |
Let's continue the discussion about extending for cython on gh-14778 |
I think this proves teh case for cffi. |
Thanks Matti. |
xref #14951
Add an example of calling functions from
distributions.h
from cffi