@@ -173,6 +173,14 @@ namespace boost { namespace python { namespace converter {
173173 EIGENPY_RVALUE_FROM_PYTHON_DATA_INIT (Derived const &)
174174 };
175175
176+ // / \brief Template specialization of rvalue_from_python_data
177+ template <typename Derived>
178+ struct rvalue_from_python_data <Eigen::PlainObjectBase<Derived> const &>
179+ : rvalue_from_python_data_eigen<Derived const &>
180+ {
181+ EIGENPY_RVALUE_FROM_PYTHON_DATA_INIT (Derived const &)
182+ };
183+
176184 template <typename MatType, int Options, typename Stride>
177185 struct rvalue_from_python_data <Eigen::Ref<MatType,Options,Stride> &>
178186 : rvalue_from_python_storage<Eigen::Ref<MatType,Options,Stride> &>
@@ -425,6 +433,10 @@ namespace eigenpy
425433 typedef Eigen::EigenBase<MatType> EigenBase;
426434 EigenFromPy<EigenBase>::registration ();
427435
436+ // Add conversion to Eigen::PlainObjectBase<MatType>
437+ typedef Eigen::PlainObjectBase<MatType> PlainObjectBase;
438+ EigenFromPy<PlainObjectBase>::registration ();
439+
428440#if EIGEN_VERSION_AT_LEAST(3,2,0)
429441 // Add conversion to Eigen::Ref<MatType>
430442 typedef Eigen::Ref<MatType> RefType;
@@ -464,6 +476,20 @@ namespace eigenpy
464476 &EigenFromPy::construct,bp::type_id<Base>());
465477 }
466478 };
479+
480+ template <typename MatType>
481+ struct EigenFromPy < Eigen::PlainObjectBase<MatType> > : EigenFromPy<MatType>
482+ {
483+ typedef EigenFromPy<MatType> EigenFromPyDerived;
484+ typedef Eigen::PlainObjectBase<MatType> Base;
485+
486+ static void registration ()
487+ {
488+ bp::converter::registry::push_back
489+ (reinterpret_cast <void *(*)(_object *)>(&EigenFromPy::convertible),
490+ &EigenFromPy::construct,bp::type_id<Base>());
491+ }
492+ };
467493
468494#if EIGEN_VERSION_AT_LEAST(3,2,0)
469495
0 commit comments