From e71c4600fdbe5cdd68014339b7f1ef1956e2008f Mon Sep 17 00:00:00 2001 From: Justin Carpentier <justin.carpentier@inria.fr> Date: Thu, 18 Oct 2018 23:41:30 +0200 Subject: [PATCH] conversion: rename PyMatrixType in NumpyType to reflect change --- include/eigenpy/details.hpp | 10 +++++----- src/eigenpy.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/eigenpy/details.hpp b/include/eigenpy/details.hpp index fea17482..1ca6578b 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 df38094a..297646d0 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); -- GitLab