Verified Commit e71c4600 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

conversion: rename PyMatrixType in NumpyType to reflect change

parent 0b3366f3
......@@ -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();
}
};
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment