Skip to content
Snippets Groups Projects
Verified Commit 646c9093 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: remove duplicates

parent 836ea585
No related branches found
No related tags found
No related merge requests found
......@@ -54,15 +54,6 @@ namespace boost { namespace python { namespace detail {
namespace eigenpy
{
template <typename SCALAR> struct NumpyEquivalentType {};
template <> struct NumpyEquivalentType<float> { enum { type_code = NPY_FLOAT };};
template <> struct NumpyEquivalentType< std::complex<float> > { enum { type_code = NPY_CFLOAT };};
template <> struct NumpyEquivalentType<double> { enum { type_code = NPY_DOUBLE };};
template <> struct NumpyEquivalentType< std::complex<double> > { enum { type_code = NPY_CDOUBLE };};
template <> struct NumpyEquivalentType<long double> { enum { type_code = NPY_LONGDOUBLE };};
template <> struct NumpyEquivalentType< std::complex<long double> > { enum { type_code = NPY_CLONGDOUBLE };};
template <> struct NumpyEquivalentType<int> { enum { type_code = NPY_INT };};
template <> struct NumpyEquivalentType<long> { enum { type_code = NPY_LONG };};
template <typename SCALAR1, typename SCALAR2>
struct FromTypeToType : public boost::false_type {};
......@@ -307,9 +298,11 @@ namespace eigenpy
PyArrayObject* pyArray;
// Allocate Python memory
std::cout << "basic convert" << std::endl;
if( ( ((!(C == 1) != !(R == 1)) && !MatType::IsVectorAtCompileTime) || MatType::IsVectorAtCompileTime)
&& NumpyType::getType() == ARRAY_TYPE) // Handle array with a single dimension
{
std::cout << "mat1\n" << mat << std::endl;
npy_intp shape[1] = { C == 1 ? R : C };
pyArray = (PyArrayObject*) PyArray_SimpleNew(1, shape,
NumpyEquivalentType<Scalar>::type_code);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment