diff --git a/Base/Py/PyCore.h b/Base/Py/PyCore.h
index 0c1a0e40a9025c6474c786e981d7c5e5ed7e546b..87ea5646bea53746a706bfbe769322e3cf9713f4 100644
--- a/Base/Py/PyCore.h
+++ b/Base/Py/PyCore.h
@@ -34,6 +34,7 @@
 #include <Python.h>
 #define PY_ARRAY_UNIQUE_SYMBOL BORNAGAIN_PYTHONAPI_ARRAY
 #define NO_IMPORT_ARRAY
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION // to prevent spurious warning
 #include <numpy/arrayobject.h>
 
 #include "auto/Wrap/swig_runtime.h"