Skip to content

Commit 7f92dd3

Browse files
committed
[All] Set deprecated enableEigenPySpecific with two template parameters
1 parent 6cd3c0d commit 7f92dd3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/details.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace eigenpy
7676
};
7777

7878
/* --- TO PYTHON -------------------------------------------------------------- */
79-
template< typename MatType,typename EquivalentEigenType >
79+
template<typename MatType>
8080
struct EigenToPy
8181
{
8282
static PyObject* convert(MatType const& mat)
@@ -88,9 +88,9 @@ namespace eigenpy
8888

8989
npy_intp shape[2] = { R,C };
9090
PyArrayObject* pyArray = (PyArrayObject*)
91-
PyArray_SimpleNew(2, shape, NumpyEquivalentType<T>::type_code);
91+
PyArray_SimpleNew(2, shape, NumpyEquivalentType<T>::type_code);
9292

93-
MapNumpy<EquivalentEigenType>::map(pyArray) = mat;
93+
MapNumpy<MatType>::map(pyArray) = mat;
9494

9595
return PyMatrixType::getInstance().make(pyArray).ptr();
9696
}
@@ -136,7 +136,7 @@ namespace eigenpy
136136
};
137137

138138

139-
template<typename MatType,typename EquivalentEigenType>
139+
template<typename MatType>
140140
struct EigenFromPy
141141
{
142142
EigenFromPy()
@@ -197,14 +197,14 @@ namespace eigenpy
197197
using namespace Eigen;
198198

199199
PyArrayObject * pyArray = reinterpret_cast<PyArrayObject*>(pyObj);
200-
typename MapNumpy<EquivalentEigenType>::EigenMap numpyMap = MapNumpy<EquivalentEigenType>::map(pyArray);
200+
typename MapNumpy<MatType>::EigenMap numpyMap = MapNumpy<MatType>::map(pyArray);
201201

202202
void* storage = ((bp::converter::rvalue_from_python_storage<MatType>*)
203203
((void*)memory))->storage.bytes;
204204
assert( (numpyMap.rows()<INT_MAX) && (numpyMap.cols()<INT_MAX)
205205
&& "Map range larger than int ... can never happen." );
206206
int r=(int)numpyMap.rows(),c=(int)numpyMap.cols();
207-
EquivalentEigenType & eigenMatrix = //* new(storage) MatType(numpyMap.rows(),numpyMap.cols());
207+
MatType & eigenMatrix = //* new(storage) MatType(numpyMap.rows(),numpyMap.cols());
208208
TraitsMatrixConstructor<MatType,MatType::RowsAtCompileTime,MatType::ColsAtCompileTime>::construct (storage,r,c);
209209
memory->convertible = storage;
210210

@@ -225,8 +225,8 @@ namespace eigenpy
225225
numpy_import_array();
226226
if(check_registration<MatType>()) return;
227227

228-
boost::python::to_python_converter<MatType,EigenToPy<MatType,MatType> >();
229-
EigenFromPy<MatType,MatType>();
228+
boost::python::to_python_converter<MatType,EigenToPy<MatType> >();
229+
EigenFromPy<MatType>();
230230
}
231231

232232
} // namespace eigenpy

0 commit comments

Comments
 (0)