File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,12 @@ MatrixDerived base(const Eigen::MatrixBase<MatrixDerived> & m)
8181 return m.derived ();
8282}
8383
84+ template <typename MatrixDerived>
85+ MatrixDerived plain (const Eigen::PlainObjectBase<MatrixDerived> & m)
86+ {
87+ return m.derived ();
88+ }
89+
8490template <typename Scalar>
8591Eigen::Matrix<Scalar,6 ,6 > matrix6 (const Scalar & value)
8692{
@@ -123,6 +129,9 @@ BOOST_PYTHON_MODULE(matrix)
123129
124130 bp::def (" base" , base<VectorXd>);
125131 bp::def (" base" , base<MatrixXd>);
132+
133+ bp::def (" plain" , plain<VectorXd>);
134+ bp::def (" plain" , plain<MatrixXd>);
126135
127136 bp::def (" matrix6" , matrix6<double >);
128137}
Original file line number Diff line number Diff line change 3636Mref_from_base = eigenpy .base (Mref )
3737assert ( np .array_equal (Mref ,Mref_from_base ) );
3838
39+ # Test plain function
40+ Mref_from_plain = eigenpy .plain (Mref )
41+ assert ( np .array_equal (Mref ,Mref_from_plain ) );
42+
3943if verbose : print ("===> Matrix 8x8" )
4044M = Mref
4145assert ( np .array_equal (M ,eigenpy .reflex (M ,verbose )) );
You can’t perform that action at this time.
0 commit comments