#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION, to avoid warnings
added compatibility fixes for numpy 1.6.2