numpy.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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. #ifndef boost_python_numpy_hpp_
  7. #define boost_python_numpy_hpp_
  8. #include <boost/python/numpy/dtype.hpp>
  9. #include <boost/python/numpy/ndarray.hpp>
  10. #include <boost/python/numpy/scalars.hpp>
  11. #include <boost/python/numpy/matrix.hpp>
  12. #include <boost/python/numpy/ufunc.hpp>
  13. #include <boost/python/numpy/invoke_matching.hpp>
  14. #include <boost/python/numpy/config.hpp>
  15. namespace boost { namespace python { namespace numpy {
  16. /**
  17. * @brief Initialize the Numpy C-API
  18. *
  19. * This must be called before using anything in boost.numpy;
  20. * It should probably be the first line inside BOOST_PYTHON_MODULE.
  21. *
  22. * @internal This just calls the Numpy C-API functions "import_array()"
  23. * and "import_ufunc()", and then calls
  24. * dtype::register_scalar_converters().
  25. */
  26. BOOST_NUMPY_DECL void initialize(bool register_scalar_converters=true);
  27. }}} // namespace boost::python::numpy
  28. #endif