Verified Commit 3f7aa4d3 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: rely on getPyType function to get the PyTypeObject related to a Scalar type

parent c8600316
......@@ -25,7 +25,7 @@ namespace boost { namespace python {
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
inline PyTypeObject const*
get_pytype()const
get_pytype() const
{
return converter::registered_pytype<MatrixRef>::get_pytype();
}
......
......@@ -42,8 +42,8 @@ namespace eigenpy
if(NumpyType::sharedMemory())
{
PyTypeObject * py_type_ptr = &PyArray_Type;
PyArrayObject * pyArray = (PyArrayObject*) call_PyArray_New(py_type_ptr,
PyTypeObject py_type = getPyType<Scalar>();
PyArrayObject * pyArray = (PyArrayObject*) call_PyArray_New(&py_type,
static_cast<int>(nd),
shape,
NumpyEquivalentType<Scalar>::type_code,
......@@ -80,8 +80,8 @@ namespace eigenpy
if(NumpyType::sharedMemory())
{
PyTypeObject * py_type_ptr = &PyArray_Type;
PyArrayObject * pyArray = (PyArrayObject*) call_PyArray_New(py_type_ptr,
PyTypeObject py_type = getPyType<Scalar>();
PyArrayObject * pyArray = (PyArrayObject*) call_PyArray_New(&py_type,
static_cast<int>(nd),
shape,
NumpyEquivalentType<Scalar>::type_code,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment