Skip to content

Commit 3a48c50

Browse files
Activate the NPY_NO_DEPRECATED_API only if numpy version is above 8
1 parent 39ec133 commit 3a48c50

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/details.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
#include <boost/python.hpp>
2121
#include <Eigen/Core>
2222

23+
#include <numpy/numpyconfig.h>
24+
#ifdef NPY_1_8_API_VERSION
25+
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
26+
#endif
27+
2328
#include <numpy/arrayobject.h>
2429
#include <iostream>
2530

src/fwd.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919

2020
#include <boost/python.hpp>
2121
#include <Eigen/Core>
22+
23+
#ifdef NPY_1_8_API_VERSION
2224
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
25+
#endif
2326

2427
namespace eigenpy
2528
{

0 commit comments

Comments
 (0)