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)
6 
7 #ifndef boost_python_numpy_internal_hpp_
8 #define boost_python_numpy_internal_hpp_
9 
10 /**
11  *  @file boost/python/numpy/internal.hpp
12  *  @brief Internal header file to include the Numpy C-API headers.
13  *
14  *  This should only be included by source files in the boost.numpy library itself.
15  */
16 
17 #include <boost/python.hpp>
18 #include <boost/python/numpy/config.hpp>
19 #ifdef BOOST_PYTHON_NUMPY_INTERNAL
20 #define NO_IMPORT_ARRAY
21 #define NO_IMPORT_UFUNC
22 #else
23 #ifndef BOOST_PYTHON_NUMPY_INTERNAL_MAIN
24 ERROR_internal_hpp_is_for_internal_use_only
25 #endif
26 #endif
27 #define PY_ARRAY_UNIQUE_SYMBOL BOOST_NUMPY_ARRAY_API
28 #define PY_UFUNC_UNIQUE_SYMBOL BOOST_UFUNC_ARRAY_API
29 #include <numpy/arrayobject.h>
30 #include <numpy/ufuncobject.h>
31 #include <boost/python/numpy.hpp>
32 
33 #define NUMPY_OBJECT_MANAGER_TRAITS_IMPL(pytype,manager)                \
34     PyTypeObject const * object_manager_traits<manager>::get_pytype() { return &pytype; }
35 
36 #endif
37