Skip to content
Snippets Groups Projects
Commit a1263ab7 authored by Bienchen's avatar Bienchen
Browse files

SCHWED-4612: Dealing with the NumPy deprecation compiler warning.

parent 910170ca
Branches
Tags
No related merge requests found
......@@ -35,7 +35,15 @@ using namespace ost::mol;
#include <ost/export_helper/generic_property_def.hh>
/* Including NumPy headers produces compiler warnings. The ones about "Using
deprecated NumPy API..." we can not get rid of. The highest NumPy version we
support is 1.6 while the non-deprecated API starts with version 1.7.
Also see the comment in modules/gfx/pymod/export_primlist.cc for further
information.
*/
#if OST_NUMPY_SUPPORT_ENABLED
#include <numpy/numpyconfig.h>
#define NPY_NO_DEPRECATED_API NPY_1_6_API_VERSION
#include <numpy/arrayobject.h>
#endif
......@@ -131,6 +139,7 @@ void export_Entity()
{
#if OST_NUMPY_SUPPORT_ENABLED
// The following define enforces no return value when calling import_array
#undef NUMPY_IMPORT_ARRAY_RETVAL
#define NUMPY_IMPORT_ARRAY_RETVAL
import_array();
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment