-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Combining extensions in stats._boost
into one
#16583
Combining extensions in stats._boost
into one
#16583
Comments
Per distribution (9 functions: pdf, sf, kurtosis, etc.), but I understand the concern. It should be smaller than that. That would probably work -- we could also rewrite the code gen to use the numpy ufunc C API instead of the Cython API. Thinking quickly about it, that would reduce the amount of code gen necessary to deal with variable number of arguments. I may have time to look at this later this week. |
That sounds like a good option too. Thanks Nicholas! |
As @mckib2 suggests in mckib2#33 (comment), it's probably better to get rid of the separate wrapping of Boost functionality in |
In general, I think this is worth doing. I can take it up. I will have to look into |
As per #20208 (comment) (with some decisions to be made on #20208 (comment)) I think this is worth doing and I will be start doing this from Monday onwards. |
I have a question. For the following, why don't we use direct results from here. Mean, skewness, kurtosis and variance have closed form expressions for beta distribution, so why calling into scipy/scipy/stats/_continuous_distns.py Lines 702 to 707 in 8b22ba9
The only reason that I can think of is that Anyways, for now I am using closed forms just to check what needs to be done to remove scipy/scipy/stats/_boost/include/func_defs.hpp Lines 117 to 142 in 8b22ba9
I will open a PR with beta distribution updated by tonight. |
After gh-15770 I noticed another wheel size increase. With the current codegen it's easy to add new functions, but it looks like a separate new Python extension per function isn't all that sustainable:
That's ~350kb per function. A lot of which will be Cython overhead I expect. @mckib2 what do you think about putting them all in a single
_ufuncs
extension?The text was updated successfully, but these errors were encountered: