diff --git a/include/eigenpy/numpy-type.hpp b/include/eigenpy/numpy-type.hpp
index a5d12aef29f47d139692ed1b146eb6286847806e..319fd2abfb24b35dd781a7ef68da21b6c084cd37 100644
--- a/include/eigenpy/numpy-type.hpp
+++ b/include/eigenpy/numpy-type.hpp
@@ -24,14 +24,20 @@ bool np_type_is_convertible_into_scalar(const int np_type) {
   if (NumpyEquivalentType<Scalar>::type_code == np_type) return true;
 
   switch (np_type) {
+#ifdef WIN32
     case NPY_INT:
+    case NPY_LONG:
       return FromTypeToType<int, Scalar>::value;
-#ifdef WIN32
     case NPY_INT64:
+    case NPY_LONGLONG:
       return FromTypeToType<__int64, Scalar>::value;
-#endif
+#else
+    case NPY_INT:
+      return FromTypeToType<int, Scalar>::value;
     case NPY_LONG:
+    case NPY_LONGLONG:
       return FromTypeToType<long, Scalar>::value;
+#endif
     case NPY_FLOAT:
       return FromTypeToType<float, Scalar>::value;
     case NPY_CFLOAT: