]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/python/src/numpy/numpy.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / python / src / numpy / numpy.cpp
CommitLineData
7c673cae
FG
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#define BOOST_PYTHON_NUMPY_INTERNAL_MAIN
8#include <boost/python/numpy/internal.hpp>
9#include <boost/python/numpy/dtype.hpp>
10
11namespace boost { namespace python { namespace numpy {
12
13#if PY_MAJOR_VERSION == 2
14static void wrap_import_array()
15{
16 import_array();
17}
18#else
19static void * wrap_import_array()
20{
21 import_array();
92f5a8d4 22 return NULL;
7c673cae
FG
23}
24#endif
25
26void initialize(bool register_scalar_converters)
27{
28 wrap_import_array();
29 import_ufunc();
30 if (register_scalar_converters)
31 dtype::register_scalar_converters();
32}
33
34}}} // namespace boost::python::numpy