diff --git a/include/eigenpy/details.hpp b/include/eigenpy/details.hpp index fea174827eae373675144739de201cb73461d05d..1ca6578b06dd79a2cf29356cf62b9fc16a47e075 100644 --- a/include/eigenpy/details.hpp +++ b/include/eigenpy/details.hpp @@ -54,12 +54,12 @@ namespace eigenpy namespace bp = boost::python; - struct PyMatrixType + struct NumpyType { - static PyMatrixType & getInstance() + static NumpyType & getInstance() { - static PyMatrixType instance; + static NumpyType instance; return instance; } @@ -100,7 +100,7 @@ namespace eigenpy } protected: - PyMatrixType() + NumpyType() { pyModule = bp::import("numpy"); @@ -208,7 +208,7 @@ namespace eigenpy EigenObjectAllocator<MatType>::convert(mat,pyArray); - return PyMatrixType::getInstance().make(pyArray).ptr(); + return NumpyType::getInstance().make(pyArray).ptr(); } }; diff --git a/src/eigenpy.cpp b/src/eigenpy.cpp index df38094ae80e5853a62edb8119d2d346f20e209b..297646d0cde25b33a2e8a3aa52aa65656c082d9e 100644 --- a/src/eigenpy.cpp +++ b/src/eigenpy.cpp @@ -25,14 +25,14 @@ namespace eigenpy using namespace Eigen; Exception::registerException(); - bp::def("setNumpyType",&PyMatrixType::setNumpyType, + bp::def("setNumpyType",&NumpyType::setNumpyType, bp::arg("Numpy type (np.ndarray or np.matrix)"), "Change the type returned by the converters from an Eigen object."); - bp::def("switchToNumpyArray",&PyMatrixType::switchToNumpyArray, + bp::def("switchToNumpyArray",&NumpyType::switchToNumpyArray, "Set the conversion from Eigen::Matrix to numpy.ndarray."); - bp::def("switchToNumpyMatrix",&PyMatrixType::switchToNumpyMatrix, + bp::def("switchToNumpyMatrix",&NumpyType::switchToNumpyMatrix, "Set the conversion from Eigen::Matrix to numpy.matrix."); ENABLE_SPECIFIC_MATRIX_TYPE(MatrixXd);