From 7d28bd5e914f9d884fc89dbe0162c1cc4633643d Mon Sep 17 00:00:00 2001 From: Justin Carpentier <justin.carpentier@inria.fr> Date: Wed, 7 Dec 2022 19:25:53 +0100 Subject: [PATCH] core: fix issue with Vector types a vector should be either C or F continuous --- include/eigenpy/eigen-allocator.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/eigenpy/eigen-allocator.hpp b/include/eigenpy/eigen-allocator.hpp index 2ca889db..650da8dd 100644 --- a/include/eigenpy/eigen-allocator.hpp +++ b/include/eigenpy/eigen-allocator.hpp @@ -245,7 +245,8 @@ inline bool is_arr_layout_compatible_with_mat_type(PyArrayObject *pyArray) { bool is_array_F_cont = PyArray_IS_F_CONTIGUOUS(pyArray); return (MatType::IsRowMajor && is_array_C_cont) || (!MatType::IsRowMajor && is_array_F_cont) || - MatType::IsVectorAtCompileTime; + (MatType::IsVectorAtCompileTime && + (is_array_C_cont || is_array_F_cont)); } template <typename MatType, int Options, typename Stride> -- GitLab