diff --git a/include/pybind11/eigen.h b/include/pybind11/eigen.h index a8e749a316..97b1d96b09 100644 --- a/include/pybind11/eigen.h +++ b/include/pybind11/eigen.h @@ -573,7 +573,9 @@ struct type_caster::value>> { if (!values || !innerIndices || !outerIndices) return false; - value = Eigen::MappedSparseMatrix( + value = Eigen::MappedSparseMatrix( shape[0].cast(), shape[1].cast(), nnz, outerIndices.mutable_data(), innerIndices.mutable_data(), values.mutable_data());