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"); }