numpy.get_include

numpy.get_include() [source]

Return the directory that contains the NumPy *.h header files.

Extension modules that need to compile against NumPy should use this function to locate the appropriate include directory.

Notes

When using distutils, for example in setup.py.

import numpy as np
...
Extension('extension_name', ...
        include_dirs=[np.get_include()])
...

© 2005–2020 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.19/reference/generated/numpy.get_include.html