Skip to content

Commit f82cd35

Browse files
jcarpentjorisv
authored andcommitted
core: use NPY_API_SYMBOL_ATTRIBUTE for Numpy >= 2.x
1 parent db1093d commit f82cd35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/eigenpy/numpy.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
#define PY_ARRAY_UNIQUE_SYMBOL EIGENPY_ARRAY_API
1212
#endif
1313

14+
// For compatibility with Numpy 2.x
15+
// See
16+
// https://numpy.org/devdocs/reference/c-api/array.html#c.NPY_API_SYMBOL_ATTRIBUTE
17+
#define NPY_API_SYMBOL_ATTRIBUTE
18+
1419
#include <numpy/numpyconfig.h>
1520
#ifdef NPY_1_8_API_VERSION
1621
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

0 commit comments

Comments
 (0)