@@ -108,7 +108,7 @@ namespace eigenpy
108108 {
109109 static MatType & construct (void *storage,int /* r*/ ,int c)
110110 {
111- return * new (storage) MatType (c);
111+ return * new (storage) MatType (R, c);
112112 }
113113 };
114114
@@ -117,7 +117,7 @@ namespace eigenpy
117117 {
118118 static MatType & construct (void *storage,int r,int /* c*/ )
119119 {
120- return * new (storage) MatType (r);
120+ return * new (storage) MatType (r,C );
121121 }
122122 };
123123
@@ -168,7 +168,6 @@ namespace eigenpy
168168 static void construct (PyObject* pyObj,
169169 bp::converter::rvalue_from_python_stage1_data* memory)
170170 {
171- typedef typename MatType::Scalar T;
172171 using namespace Eigen ;
173172
174173 PyArrayObject * pyArray = reinterpret_cast <PyArrayObject*>(pyObj);
@@ -191,20 +190,26 @@ namespace eigenpy
191190 void enableEigenPySpecific ()
192191 {
193192 import_array ();
194-
195- #ifdef EIGEN_DONT_VECTORIZE
193+
194+ #ifdef EIGEN_DONT_VECTORIZE
195+
196196 boost::python::to_python_converter<MatType,
197- eigenpy::EigenToPy<MatType,MatType> >();
197+ eigenpy::EigenToPy<MatType,MatType> >();
198198 eigenpy::EigenFromPy<MatType,MatType>();
199- #else
200- typedef typename eigenpy::UnalignedEquivalent<MatType>::type MatTypeDontAlign;
199+ #else
201200
202201 boost::python::to_python_converter<MatType,
203202 eigenpy::EigenToPy<MatType,MatType> >();
203+ eigenpy::EigenFromPy<MatType,MatType>();
204+
205+ typedef typename eigenpy::UnalignedEquivalent<MatType>::type MatTypeDontAlign;
206+ #ifndef EIGENPY_ALIGNED
204207 boost::python::to_python_converter<MatTypeDontAlign,
205208 eigenpy::EigenToPy<MatTypeDontAlign,MatTypeDontAlign> >();
206209 eigenpy::EigenFromPy<MatTypeDontAlign,MatTypeDontAlign>();
207210#endif
211+ #endif
212+
208213
209214 }
210215
0 commit comments