From 437e02ef3bb8dd5c590d96b670b66d93bfadc544 Mon Sep 17 00:00:00 2001
From: Justin Carpentier <justin.carpentier@inria.fr>
Date: Mon, 20 Feb 2023 20:56:31 +0100
Subject: [PATCH] core: try a fix

---
 include/eigenpy/eigen-allocator.hpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/eigenpy/eigen-allocator.hpp b/include/eigenpy/eigen-allocator.hpp
index a9b8dc28..edf89dd5 100644
--- a/include/eigenpy/eigen-allocator.hpp
+++ b/include/eigenpy/eigen-allocator.hpp
@@ -342,9 +342,10 @@ struct eigen_allocator_impl_tensor {
       tensor)
 
   /// \brief Copy Python array into the input matrix mat.
-  template <typename TensorDerived>
-  static void copy(PyArrayObject *pyArray,
-                   const Eigen::TensorBase<TensorDerived> &tensor_) {
+  template <typename TensorDerived, int AccessLevel>
+  static void copy(
+      PyArrayObject *pyArray,
+      const Eigen::TensorBase<TensorDerived, AccessLevel> &tensor_) {
     TensorDerived &tensor = const_cast<TensorDerived &>(
         static_cast<const TensorDerived &>(tensor_));
     const int pyArray_type_code = EIGENPY_GET_PY_ARRAY_TYPE(pyArray);
-- 
GitLab