Use numpy not numeric for boost 1.65+ - fixes #1581 (#1664)

boost python numeric no longer exists in boost 1.65, so check boost version and conditionally use boost python numpy.
This commit is contained in:
Matt Swain
2017-11-18 05:30:32 +00:00
committed by Greg Landrum
parent b6d583aa26
commit e57b7a9bc8
13 changed files with 33 additions and 25 deletions

View File

@@ -3,13 +3,13 @@
//
#include <boost/python.hpp>
#include <boost/python/numeric.hpp>
#include <RDBoost/boost_numpy.h>
#define PY_ARRAY_UNIQUE_SYMBOL RD_array_API
#include <numpy/arrayobject.h>
namespace python = boost::python;
double GetFirstElement(python::numeric::array &x) {
double GetFirstElement(NumpyArrayType &x) {
PyArrayObject *ptr = (PyArrayObject *)x.ptr();
void *data = PyArray_DATA(ptr);
double res = 0.0;