From c4df281e9d88ffd40f76d42ea824ab65afd26f9f Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Mon, 10 Jun 2024 19:23:08 -0700 Subject: [PATCH] Also remove return_value_policy::_return_as_bytes in pybind11/eigen/ --- include/pybind11/eigen/matrix.h | 3 --- include/pybind11/eigen/tensor.h | 4 ---- 2 files changed, 7 deletions(-) diff --git a/include/pybind11/eigen/matrix.h b/include/pybind11/eigen/matrix.h index eafbca1490..8d4342f81b 100644 --- a/include/pybind11/eigen/matrix.h +++ b/include/pybind11/eigen/matrix.h @@ -351,9 +351,6 @@ struct type_caster::value>> { return eigen_ref_array(*src); case return_value_policy::reference_internal: return eigen_ref_array(*src, parent); - case return_value_policy::_return_as_bytes: - pybind11_fail("return_value_policy::_return_as_bytes does not apply."); - break; default: throw cast_error("unhandled return_value_policy: should not happen!"); }; diff --git a/include/pybind11/eigen/tensor.h b/include/pybind11/eigen/tensor.h index 803d41becf..d4ed6c0ca8 100644 --- a/include/pybind11/eigen/tensor.h +++ b/include/pybind11/eigen/tensor.h @@ -313,10 +313,6 @@ struct type_caster::ValidType> { writeable = !std::is_const::value; break; - case return_value_policy::_return_as_bytes: - pybind11_fail("return_value_policy::_return_as_bytes does not apply."); - break; - default: pybind11_fail("pybind11 bug in eigen.h, please file a bug report"); }