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 issue and numpy scalar array type from numpy.i and pyfragments.swg #7017

Closed
tns-yuq opened this issue Jan 15, 2016 · 1 comment
Closed

Comments

@tns-yuq
Copy link

tns-yuq commented Jan 15, 2016

Currently I am using numpy_version 1.9.2.

If I build with the current files, there are a lot of incompatible warnings as:
warning: passing argument 1 of ‘PyArray_DATA’ from incompatible pointer type [enabled by default]
arg2 = (double*)PyArray_DATA(obj1);
numpy/core/include/numpy/ndarraytypes.h:1460:1: note: expected ‘struct PyArrayObject *’ but argument is of type ‘struct PyObject *’
PyArray_DATA(PyArrayObject *arr)

If I comment out '#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION', those incompatible warnings disappears, but a single new warning presents as:
warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by ".

From the manual, the numpy scalar array type issue should be addressed by putting pyfragments.swg in the source folder. However, it does not work for me. The numpy array scalars still cannot be passed to C. It works previously when I was using numpy1.6. After I updated the new version, all these issues come along.

What I was wrong of using these files? Is there a proper way to solve these issues?

@bsipocz
Copy link
Member

bsipocz commented Aug 16, 2019

I don't exactly understand what the issue was here, but a lot has happened since numpy 1.7-1.9, so maybe this can be closed.

If the issue is still relevant I would suggest opening a new one/reopen this with some more details, and some reproducible examples.

@mattip mattip closed this as completed Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants