You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to build against Numpy 2.0 (released yesterday) gives the error:
0.606 aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -Werror=implicit-function-declaration -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -fPIC -I/venv/lib/python3.11/site-packages/numpy/_core/include -I. -I/venv/include -I/usr/include/python3.11 -c GPy/kern/src/stationary_cython.c -o build/temp.linux-aarch64-cpython-311/GPy/kern/src/stationary_cython.o -fopenmp -O3
0.668 In file included from /venv/lib/python3.11/site-packages/numpy/_core/include/numpy/ndarraytypes.h:1909,
0.668 from /venv/lib/python3.11/site-packages/numpy/_core/include/numpy/ndarrayobject.h:12,
0.668 from /venv/lib/python3.11/site-packages/numpy/_core/include/numpy/arrayobject.h:5,
0.668 from GPy/kern/src/stationary_cython.c:750:
0.668 /venv/lib/python3.11/site-packages/numpy/_core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
0.668 17 | #warning "Using deprecated NumPy API, disable it with " \
0.668 | ^~~~~~~
0.679 In file included from /usr/include/python3.11/Python.h:38,
0.679 from GPy/kern/src/stationary_cython.c:6:
0.679 GPy/kern/src/stationary_cython.c: In function ‘__pyx_f_5numpy_PyDataType_SHAPE’:
0.682 GPy/kern/src/stationary_cython.c:4159:39: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
0.682 4159 | __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
0.682 | ^~
0.682 /usr/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
0.682 24 | #define _Py_CAST(type, expr) ((type)(expr))
0.682 | ^~~~
0.682 /usr/include/python3.11/object.h:506:35: note: in expansion of macro ‘_PyObject_CAST’
0.682 506 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
0.682 | ^~~~~~~~~~~~~~
0.682 GPy/kern/src/stationary_cython.c:1536:27: note: in expansion of macro ‘Py_INCREF’
0.682 1536 | #define __Pyx_INCREF(r) Py_INCREF(r)
0.682 | ^~~~~~~~~
0.682 GPy/kern/src/stationary_cython.c:4159:5: note: in expansion of macro ‘__Pyx_INCREF’
0.682 4159 | __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
0.682 | ^~~~~~~~~~~~
0.682 GPy/kern/src/stationary_cython.c:4160:36: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
0.682 4160 | __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
0.682 | ^~
1.052 error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
I'm surprised that the "deprecated" API seems to have changed but not entirely disappeared. I imagine that for the time being, a quick fix would be to require numpy < 2.0.
The text was updated successfully, but these errors were encountered:
Trying to build against Numpy 2.0 (released yesterday) gives the error:
I'm surprised that the "deprecated" API seems to have changed but not entirely disappeared. I imagine that for the time being, a quick fix would be to require numpy < 2.0.
The text was updated successfully, but these errors were encountered: