diff --git a/include/pybind11/eigen.h b/include/pybind11/eigen.h index 7a0fe930..987b5470 100644 --- a/include/pybind11/eigen.h +++ b/include/pybind11/eigen.h @@ -73,7 +73,7 @@ struct type_caster::value>::t auto strides = Strides(info.strides[0] / sizeof(Scalar)); - Strides::Index n_elts = info.shape[0]; + Strides::Index n_elts = (Strides::Index) info.shape[0]; Strides::Index unity = 1; value = Eigen::Map(