I am writing a small C function that is supposed to accelerate some compute intensive portions of a larger application that I have in Python. Naturally I have written a wrapper that ensures that my C code can talk seamlessly with my Python numpy arrays. All is well and I am using the following setup.py
from distutils.core import setup, Extension
import numpy
module1 = Extension('my_wrapper',
sources = ['my_c_file.c'],
include_dirs=[numpy.get_include()],
extra_compile_args = ['-fopenmp'],
extra_link_args = ['-lgomp'])
setup(name = 'my_wrapper',
version = '1.0',
description = 'Some description here',
ext_modules = [module1])
Everything works when I compile this with the command python3 setup.py install and the code behaviour is as expected but I am getting the following warning,
warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
Although this is just a warning, I would still like to avoid this if I can. Any ideas on how to do that?
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSIONinmy_c_file.cbut I don't think that helped