g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -pthread -g -I . -I .. -I
/usr/include -I /usr/include/OpenEXR -I /usr/include -I /usr/include
-DOPENVDB_USE_LOG4CPLUS -I . -fPIC -I python -I /usr/include/python2.7
-I /usr/include/python2.7 -I
/usr/share/pyshared/numpy/core/include/numpy/ -I
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/
-DPY_OPENVDB_USE_NUMPY -o python/pyFloatGrid.o python/pyFloatGrid.cc
In file included from
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from python/pyGrid.h:41,
from python/pyFloatGrid.cc:35:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2:
warning: #warning "Using deprecated NumPy API, disable it by "
"#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \[**]
g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -pthread -g -I . -I .. -I /usr/include -I /usr/include/OpenEXR -I /usr/include -I /usr/include -DOPENVDB_USE_LOG4CPLUS -I . -fPIC -I python -I /usr/include/python2.7 -I /usr/include/python2.7 -I /usr/share/pyshared/numpy/core/include/numpy/ -I /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ -DPY_OPENVDB_USE_NUMPY -o python/pyMetadata.o python/pyMetadata.cc In file included from python/pyFloatGrid.cc:35:0: python/pyGrid.h: In constructor 'pyGrid::CopyOpBase<GridType>::CopyOpBase(bool, GridType&, boost::python::api::object, boost::python::api::object, boost::python::api::object)': python/pyGrid.h:764:66: error: cannot convert 'PyObject* {aka _object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument '1' to 'PyArray_Descr* PyArray_DESCR(PyArrayObject*)' const PyArray_Descr* dtype = PyArray_DESCR(arrayObj.ptr()); ^ python/pyGrid.h:774:45: error: cannot convert 'PyObject* {aka _object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument '1' to 'void* PyArray_DATA(PyArrayObject*)' mArray = PyArray_DATA(arrayObj.ptr()); ^ In file included from python/pyIntGrid.cc:34:0: python/pyGrid.h: In constructor 'pyGrid::CopyOpBase<GridType>::CopyOpBase(bool, GridType&, boost::python::api::object, boost::python::api::object, boost::python::api::object)': python/pyGrid.h:764:66: error: cannot convert 'PyObject* {aka _object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument '1' to 'PyArray_Descr* PyArray_DESCR(PyArrayObject*)' const PyArray_Descr* dtype = PyArray_DESCR(arrayObj.ptr()); ^ python/pyGrid.h:774:45: error: cannot convert 'PyObject* {aka _object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument '1' to 'void* PyArray_DATA(PyArrayObject*)' mArray = PyArray_DATA(arrayObj.ptr());
*** pyGrid.h 2014-06-24 10:54:11.814014609 -0700
--- pyGrid.h 2014-06-24 10:54:18.873808177 -0700
***************
*** 755,766 ****
const Coord origin = extractValueArg<GridType, Coord>(
coordObj, opName[toGrid], 1, "tuple(int, int, int)");
! // Extract a reference to (not a copy of) the NumPy array.
const py::numeric::array arrayObj = pyutil::extractArg<py::numeric::array>(
arrObj, opName[toGrid], pyutil::GridTraits<GridType>::name(),
/*argIdx=*/1, "numpy.ndarray");
! const PyArray_Descr* dtype = PyArray_DESCR(arrayObj.ptr());
const py::object shape = arrayObj.attr("shape");
if (PyObject_HasAttrString(arrayObj.ptr(), "dtype")) {
--- 755,769 ----
const Coord origin = extractValueArg<GridType, Coord>(
coordObj, opName[toGrid], 1, "tuple(int, int, int)");
! // Extract a reference to (not a copy of) the NumPy array,
! // or throw an exception if arrObj is not a NumPy array object.
const py::numeric::array arrayObj = pyutil::extractArg<py::numeric::array>(
arrObj, opName[toGrid], pyutil::GridTraits<GridType>::name(),
/*argIdx=*/1, "numpy.ndarray");
! PyArrayObject* arrayObjPtr = reinterpret_cast<PyArrayObject*>(arrayObj.ptr());
!
! const PyArray_Descr* dtype = PyArray_DESCR(arrayObjPtr);
const py::object shape = arrayObj.attr("shape");
if (PyObject_HasAttrString(arrayObj.ptr(), "dtype")) {
***************
*** 770,776 ****
mArrayTypeName[1] = dtype->kind;
}
! mArray = PyArray_DATA(arrayObj.ptr());
mArrayTypeNum = dtype->type_num;
mTolerance = extractValueArg<GridType>(tolObj, opName[toGrid], 2);
for (long i = 0, N = py::len(shape); i < N; ++i) {
--- 773,779 ----
mArrayTypeName[1] = dtype->kind;
}
! mArray = PyArray_DATA(arrayObjPtr);
mArrayTypeNum = dtype->type_num;
mTolerance = extractValueArg<GridType>(tolObj, opName[toGrid], 2);
for (long i = 0, N = py::len(shape); i < N; ++i) {