1 // Copyright Jim Bosch 2010-2012.
2 // Copyright Stefan Seefeld 2016.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef boost_python_numpy_internal_hpp_
8 #define boost_python_numpy_internal_hpp_
11 * @file boost/python/numpy/internal.hpp
12 * @brief Internal header file to include the Numpy C-API headers.
14 * This should only be included by source files in the boost.numpy library itself.
17 #include <boost/python.hpp>
18 #ifdef BOOST_PYTHON_NUMPY_INTERNAL
19 #define NO_IMPORT_ARRAY
20 #define NO_IMPORT_UFUNC
22 #ifndef BOOST_PYTHON_NUMPY_INTERNAL_MAIN
23 ERROR_internal_hpp_is_for_internal_use_only
26 #define PY_ARRAY_UNIQUE_SYMBOL BOOST_NUMPY_ARRAY_API
27 #define PY_UFUNC_UNIQUE_SYMBOL BOOST_UFUNC_ARRAY_API
28 #include <numpy/arrayobject.h>
29 #include <numpy/ufuncobject.h>
30 #include <boost/python/numpy.hpp>
32 #define NUMPY_OBJECT_MANAGER_TRAITS_IMPL(pytype,manager) \
33 PyTypeObject const * object_manager_traits<manager>::get_pytype() { return &pytype; }