Skip to content

Commit 9c4d4ca

Browse files
committed
core: to not convert an Eigen::Matrix as a single dim np.array
if this matrix is not a vector at compile time!
1 parent d2d4a49 commit 9c4d4ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/eigenpy/details.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ namespace eigenpy
461461

462462
PyArrayObject* pyArray;
463463
// Allocate Python memory
464-
if(C == 1 && NumpyType::getType() == ARRAY_TYPE) // Handle array with a single dimension
464+
if(C == 1 && NumpyType::getType() == ARRAY_TYPE && MatType::IsVectorAtCompileTime) // Handle array with a single dimension
465465
{
466466
npy_intp shape[1] = { R };
467467
pyArray = (PyArrayObject*) PyArray_SimpleNew(1, shape,

0 commit comments

Comments
 (0)