-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
CLN: start using numpy-1.7 API #8329
Comments
@immerrr would be gr8 (esp for 0.15)! |
I was going to suggest it for the hackathon, are you expecting anyone who's into low-level stuff there? |
hmm, interesting, I will add this up their too. As their are going to be people who could hack on NumPy, but we'd rather co-op them to pandas :) |
I am trying to work on this bug. But half difficulty finding a starting point. It will be nice if you can point me in right direction. I have the forked the panda repo and added upstream. |
are you at the bloomberg hackathon? |
Yes |
@devanshmehta can you come over to my table? |
Ok, I gave this one a shot and it's nowhere near easy. After figuring out simple stuff, you run into two huge obstacles. One is that cython doesn't yet support numpy-1.7 api. Pandas has its own
That one can be figured out with some interaction with Cython guys (and probably backported there), but then there are rolling functions. Some of those functions in algos module do pure magic: they create one a single ndarray to refer to the window, pass it to python-level function and then alter its |
I should have mentioned |
Here's mine: immerrr@71454db |
Apologize for the delayed response. I did not work on it after the hackathon. Will post the over the branch. |
https://github.com/devanshmehta/pandas Here is the branch. Based on the conversation with Mark who was also present during the hackathon. He said there was particular macro which need to be defined before using the numpy api. The cython files cannot contain #define macro, so we created a c header file which contained the #define macro required by numpy and tried to include it in front of numpy api. After doing this there were few compilation error in both c and python files. I was trying to get rid of the compilation error by using the new numpy api. However my work is till incomplete and gives some compilation error. |
Thanks, @devanshmehta . I'll look into this. |
So I attempted to resolve this once more, but again hit some sort of a wall. For the reasons outlined here it's not permitted to modify data pointers in living arrays and a lot of |
@gfyoung your reference seems to be off, and this is certainly not closed. we have warning messages in the c-code. need to set a macro. |
@jreback : I meant to refer to the issue where we are dropping |
this refers to the c api so this issue needs to be fixed before (though of course will work when compiling on later numpy anyhow as they haven't removed the old api) |
According to the cython docs this warning should be ignored. I take that to mean we jus have to wait for them to fix it there (no indication if/when that will be). This is not actionable. Closing. |
@jbrockmendel : Could you add a link for future reference? |
i believe u can set a flag about the api to turn off the old api |
https://cython.readthedocs.io/en/latest/src/reference/compilation.html#configuring-the-c-build
The issue isn't pandas using the old API, it is cython using it. As long as cython-generated C is using the old API, we're not getting rid of those warnings. The relevant flag would be to add to |
Now that numpy-1.6 support is dropped we could proceed to use np-1.7 API.
This involves fixing a macro or two deep down in pandas internals, but otherwise should be pretty straightforward. As a bonus we can get rid of these annoying build warnings:
xref https://github.com/pydata/numexpr/pull/228/files
The text was updated successfully, but these errors were encountered: