-
-
Notifications
You must be signed in to change notification settings - Fork 18.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
aggregations.pyx: use std:: for signbit() and sqrt(). #51049
Conversation
This reintroduces how this was done in pandas 1.3.5. This should fix issue pandas-dev#51047.
Can we get this from numpy? worth up streaming a fix to cython? |
Thanks a ton for the research. I agree with @jbrockmendel though I think this change should be done upstream in Cython |
Really? Well, OK. Who takes that up with the Cython maintainers? Myself I barely know python, and much less Cython, so feel kind of lost. |
Hmm on second thought this might be something we need to handle on our end. What is importing the C++ complex header? Is that done via deque? |
The generated
but that is long after
in the generated
This is with Python 3.10 on NetBSD/macppc 10.0_BETA and cython 0.29.33. |
Awesome - appreciate all the details again. Yea this is a bit tricky - I see why your solution works but (especially since we don't have CI set up for your issue) am wary of how fragile it will be for us over time. Does importing as an alias from Cython have any effect, i.e. doing @scoder may have a better solution |
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
There's a PR for adding
This won't change anything in the generated C/C++ code. Since yo appear to be generating C++ code here, it seems reasonable to use the C+ math functions from their respective namespace. That's generally safer than using something prone to naming collisions from the flat global C namespace. |
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen. |
I'm sorry, I ran out of energy trying to understand what would be your alternative suggestions. To me it seems "more correct" and less ambigious and less dependent on the particular layout of the C header files to use the |
Sorry lost in the shuffle but from the conversation I think this is ok. If you want to meet in main and get the CI green I would approve |
Err wait...from the PR linked above it looks like Cython has libcpp.math - can you import from there now? |
This reintroduces how this was done in pandas 1.3.5. This should fix issue #51047.
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.