Skip to content

Commit f83f64f

Browse files
committed
core: add return type info
1 parent 6ac2ab1 commit f83f64f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

include/eigenpy/eigen-to-python.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ namespace eigenpy
8080
// Create an instance (either np.array or np.matrix)
8181
return NumpyType::make(pyArray).ptr();
8282
}
83+
84+
static PyTypeObject const *get_pytype()
85+
{
86+
return getPyArrayType();
87+
}
8388
};
8489

8590
template<typename MatType, int Options, typename Stride, typename _Scalar>
@@ -110,14 +115,19 @@ namespace eigenpy
110115
// Create an instance (either np.array or np.matrix)
111116
return NumpyType::make(pyArray).ptr();
112117
}
118+
119+
static PyTypeObject const *get_pytype()
120+
{
121+
return getPyArrayType();
122+
}
113123
};
114124

115125
template<typename MatType>
116126
struct EigenToPyConverter
117127
{
118128
static void registration()
119129
{
120-
bp::to_python_converter<MatType,EigenToPy<MatType> >();
130+
bp::to_python_converter<MatType,EigenToPy<MatType>, true>();
121131
}
122132
};
123133
}

0 commit comments

Comments
 (0)