From e37842767b65a6c7c88c73b8aded78c7ed65b3a4 Mon Sep 17 00:00:00 2001
From: Justin Carpentier <justin.carpentier@inria.fr>
Date: Sat, 22 Feb 2020 19:57:51 +0100
Subject: [PATCH] numpy: fix constness bug

---
 include/eigenpy/numpy-allocator.hpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/eigenpy/numpy-allocator.hpp b/include/eigenpy/numpy-allocator.hpp
index b44b1c21..02a74215 100644
--- a/include/eigenpy/numpy-allocator.hpp
+++ b/include/eigenpy/numpy-allocator.hpp
@@ -46,7 +46,6 @@ namespace eigenpy
                                                              NPY_ARRAY_MEMORY_CONTIGUOUS | NPY_ARRAY_ALIGNED,
                                                              NULL);
       
-      
       return pyArray;
     }
   };
@@ -63,11 +62,10 @@ namespace eigenpy
       
       PyArrayObject * pyArray = (PyArrayObject*) PyArray_New(&PyArray_Type, nd, shape,
                                                              NumpyEquivalentType<Scalar>::type_code, NULL,
-                                                             mat.data(), 0,
+                                                             const_cast<SimilarMatrixType &>(mat.derived()).data(), 0,
                                                              NPY_ARRAY_MEMORY_CONTIGUOUS_RO | NPY_ARRAY_ALIGNED,
                                                              NULL);
       
-      
       return pyArray;
     }
   };
-- 
GitLab