diff --git a/include/eigenpy/numpy-allocator.hpp b/include/eigenpy/numpy-allocator.hpp index 02a74215abe2dd198877dcb9c79b759eea33cff3..d35032fedb97ab0f6b7374b6063824747f56b509 100644 --- a/include/eigenpy/numpy-allocator.hpp +++ b/include/eigenpy/numpy-allocator.hpp @@ -50,6 +50,15 @@ namespace eigenpy } }; +#if EIGEN_VERSION_AT_LEAST(3,2,0) + + template<typename MatType> + struct NumpyAllocator<Eigen::Ref<MatType> > : NumpyAllocator<MatType &> + { + }; + +#endif + template<typename MatType> struct NumpyAllocator<const MatType &> { @@ -69,6 +78,15 @@ namespace eigenpy return pyArray; } }; + +#if EIGEN_VERSION_AT_LEAST(3,2,0) + + template<typename MatType> + struct NumpyAllocator<const Eigen::Ref<const MatType> > : NumpyAllocator<const MatType &> + { + }; + +#endif } #endif // ifndef __eigenpy_numpy_allocator_hpp__