diff --git a/include/eigenpy/eigenpy.hpp b/include/eigenpy/eigenpy.hpp
index bdbca6f4c2ce15699652650a8966fd81a551bab7..8a6cecc28be18685375feba1e47f812f54103ef0 100644
--- a/include/eigenpy/eigenpy.hpp
+++ b/include/eigenpy/eigenpy.hpp
@@ -19,6 +19,8 @@ namespace eigenpy {
  */
 void EIGENPY_DLLAPI enableEigenPy();
 
+bool EIGENPY_DLLAPI withTensorSupport();
+
 /* Enable the Eigen--Numpy serialization for the templated MatType class.*/
 template <typename MatType>
 void enableEigenPySpecific();
diff --git a/src/eigenpy.cpp b/src/eigenpy.cpp
index 6e13f13f3a9256d32bfb2186c8d616db677ca759..6a74bc6a932d0609fc5e8dafc7e05650961d9c87 100644
--- a/src/eigenpy.cpp
+++ b/src/eigenpy.cpp
@@ -60,4 +60,12 @@ void enableEigenPy() {
   exposeNoneType();
 }
 
+bool withTensorSupport() {
+#ifdef EIGENPY_WITH_TENSOR_SUPPORT
+  return true;
+#else
+  return false;
+#endif
+}
+
 }  // namespace eigenpy