mirror of
https://github.com/boostorg/histogram.git
synced 2026-01-30 20:02:13 +00:00
clang-formatted code
This commit is contained in:
@@ -6,27 +6,29 @@
|
||||
|
||||
#include <boost/python/module.hpp>
|
||||
#ifdef HAVE_NUMPY
|
||||
# define PY_ARRAY_UNIQUE_SYMBOL boost_histogram_ARRAY_API
|
||||
# define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
|
||||
#define PY_ARRAY_UNIQUE_SYMBOL boost_histogram_ARRAY_API
|
||||
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
|
||||
extern "C" {
|
||||
# include <numpy/arrayobject.h>
|
||||
# if PY_MAJOR_VERSION >= 3
|
||||
static void* init_numpy() { import_array(); return NULL; }
|
||||
# else
|
||||
#include <numpy/arrayobject.h>
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static void *init_numpy() {
|
||||
import_array();
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
static void init_numpy() { import_array(); }
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace histogram {
|
||||
void register_axis_types();
|
||||
void register_histogram();
|
||||
void register_axis_types();
|
||||
void register_histogram();
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_PYTHON_MODULE(histogram)
|
||||
{
|
||||
BOOST_PYTHON_MODULE(histogram) {
|
||||
#ifdef HAVE_NUMPY
|
||||
init_numpy();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user