Skip to content
Snippets Groups Projects
Unverified Commit 486f8184 authored by Alexis DUBURCQ's avatar Alexis DUBURCQ Committed by Joris Vaillant
Browse files

Update numpy.hpp

parent 69395f8b
No related branches found
No related tags found
No related merge requests found
......@@ -11,20 +11,25 @@
#define PY_ARRAY_UNIQUE_SYMBOL EIGENPY_ARRAY_API
#endif
// For compatibility with Numpy 2.x
// See
// For compatibility with Numpy 2.x. See:
// https://numpy.org/devdocs/reference/c-api/array.html#c.NPY_API_SYMBOL_ATTRIBUTE
#define NPY_API_SYMBOL_ATTRIBUTE EIGENPY_DLLAPI
#define NPY_API_SYMBOL_ATTRIBUTE
// Numpy headers drags Python with them. As a result, it
// is necessary to include the desired Python library before
// Numpy picks the default one, as it would be impossible to
// to change it afterward. Boost::Python provides a helper
// specifically dedicated to selecting the right Python
// library depending on build type, so let's make use of it.
#include <boost/python/detail/wrap_python.hpp>
#include <numpy/numpyconfig.h>
#ifdef NPY_1_8_API_VERSION
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#endif
/* Allow compiling against NumPy 1.x and 2.x
see:
https://github.com/numpy/numpy/blob/afea8fd66f6bdbde855f5aff0b4e73eb0213c646/doc/source/reference/c-api/array.rst#L1224
*/
// Allow compiling against NumPy 1.x and 2.x. See:
// https://github.com/numpy/numpy/blob/afea8fd66f6bdbde855f5aff0b4e73eb0213c646/doc/source/reference/c-api/array.rst#L1224
#if NPY_ABI_VERSION < 0x02000000
#define PyArray_DescrProto PyArray_Descr
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment