Verified Commit 23a6eea4 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

register: add helper method to retrieve the PyArray_Descr

parent c693c335
......@@ -56,6 +56,20 @@ namespace eigenpy
}
}
template<typename Scalar>
static PyArray_Descr * getPyArrayDescr()
{
namespace bp = boost::python;
if(!isNumpyNativeType<Scalar>())
{
return getPyArrayDescr(getPyType<Scalar>());
}
else
{
return call_PyArray_DescrFromType(NumpyEquivalentType<Scalar>::type_code);
}
}
template<typename Scalar>
static int getTypeCode()
{
......
Markdown is supported
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