Skip to content
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

Deprecated API warning from numpy #298

Closed
msimet opened this issue Oct 17, 2012 · 12 comments
Closed

Deprecated API warning from numpy #298

msimet opened this issue Oct 17, 2012 · 12 comments
Assignees
Labels
build Related to compiling, building, installing

Comments

@msimet
Copy link
Member

msimet commented Oct 17, 2012

Pretty much what it says in the title. When I run scons (with WARN=False), I get several copies of:

In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1722,
from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pysrc/module.cpp:4:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_AP
I NPY_1_7_API_VERSION"

@rmjarvis
Copy link
Member

The latest stable release of numpy is 1.6.2:

https://sourceforge.net/projects/numpy/files/NumPy/

I don't think we (GalSim) should be spending a lot of time trying to support numpy 1.8, which seems to be what you have. That is a beta release that is apparently too bleeding edge to even be called a beta release on sourceforge. I recommend installing 1.6.2 instead.

@msimet
Copy link
Member Author

msimet commented Oct 18, 2012

It's 1.7, not 1.8, but in any case it's a system install that I don't control. I just thought I'd note the warning in case it was a sign of something worse I didn't see (so I'm fine with closing the issue at this point).

@rmjarvis
Copy link
Member

OK. I guess I misinterpreted the warning. Most of what I found on a Google search seemed to involve numpy 1.8, so I thought the 1_7 in the warning referred to the previous version. Anyway, I think I still won't worry about it until 1.7 is considered a stable numpy release.

@rmandelb
Copy link
Member

I didn't realize it was not a stable release - e.g., on the page above it is listed with the others?

@rmjarvis
Copy link
Member

The b in 1.7.0b2 means beta. The next level is rc which means release candidate (You can see these still on the site for 1.6.x). Then they release one without these suffixes which is their official stable release.

@rmandelb
Copy link
Member

Thanks for explaining! In that case, I'm going to complain to the person who is installing packages on this system... doesn't seem reasonable to have a beta version on there as the system numpy. Anyway, I'll close this issue.

@rmjarvis
Copy link
Member

FYI, I added an item on the Installation FAQ about this, with instructions to reopen this issue if NumPy 1.7 is considered stable and the warning persists at that point. Jim said they're still working on some of the details of this within NumPy, so we should wait until they finish hashing that out before working on supporting 1.7.

@rmjarvis
Copy link
Member

I'm reopening this issue. Numpy 1.7 is now an official release, so we need to deal with this. I already updated the FAQ item to reflect this. The workaround for now is still to use WARN=false, but we should really figure out how to address this.

I tried just adding the recommended #define statement, but then I got a bunch of errors, so there is more to do than just this.

@rmjarvis rmjarvis reopened this Mar 17, 2013
@rmandelb
Copy link
Member

That's a bummer. (Note to self: when we're on GalSim version >1, try not to completely change the API, because that's really annoying…!)

On Mar 17, 2013, at 3:22 PM, Mike Jarvis notifications@github.com wrote:

I'm reopening this issue. Numpy 1.7 is now an official release, so we need to deal with this. I already updated the FAQ item to reflect this. The workaround for now is still to use WARN=false, but we should really figure out how to address this.

I tried just adding the recommended #define statement, but then I got a bunch of errors, so there is more to do than just this.


Reply to this email directly or view it on GitHub.


Rachel Mandelbaum
rmandelb@andrew.cmu.edu
http://www.andrew.cmu.edu/~rmandelb/

@rmjarvis
Copy link
Member

I think what they are doing it the right way to go, actually (given that they want to redesign aspects of the API). They keep the old API working, but marked as deprecated. Eventually, they will probably release a numpy 2.0, at which time the deprecated stuff will go away. That gives people time to make the necessary changes to their code while keeping an option to use the old API in the meanwhile (by not compiling with -Werror).

@rmandelb
Copy link
Member

Oh, I agree that they are going about it the right way given that they need an API change. I was making a lame attempt at a joke that fell totally flat (as in: let's never change our API, and then our users will never have such issues - because it seems so incredibly rare that one would never need to change the API in a complicated piece of software). I'll stop now. :)

On Mar 17, 2013, at 6:05 PM, Mike Jarvis notifications@github.com wrote:

I think what they are doing it the right way to go, actually (given that they want to redesign aspects of the API). They keep the old API working, but marked as deprecated. Eventually, they will probably release a numpy 2.0, at which time the deprecated stuff will go away. That gives people time to make the necessary changes to their code while keeping an option to use the old API in the meanwhile (by not compiling with -Werror).


Reply to this email directly or view it on GitHub.


Rachel Mandelbaum
rmandelb@andrew.cmu.edu
http://www.andrew.cmu.edu/~rmandelb/

@rmjarvis
Copy link
Member

I see. Sorry for being thick. :)

@ghost ghost assigned rmjarvis Mar 19, 2013
rmjarvis added a commit that referenced this issue Mar 20, 2013
barnabytprowe added a commit that referenced this issue Mar 20, 2013
rmjarvis added a commit that referenced this issue Mar 21, 2013
#298 Make wrapping work with numpy 1.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to compiling, building, installing
Projects
None yet
Development

No branches or pull requests

3 participants