From 7b36e4e1b3c9235f4e744c415c90a95ad4cc8375 Mon Sep 17 00:00:00 2001 From: David Grote Date: Thu, 10 Oct 2024 14:57:42 -0700 Subject: [PATCH] Print IntVect values in repr --- src/Base/IntVect.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Base/IntVect.cpp b/src/Base/IntVect.cpp index 50b29b04..0ec68921 100644 --- a/src/Base/IntVect.cpp +++ b/src/Base/IntVect.cpp @@ -28,8 +28,10 @@ namespace py::class_< iv_type > py_iv(m, iv_name.c_str()); py_iv .def("__repr__", - [iv_name](const iv_type&) { - return ""; + [iv_name](const iv_type& iv) { + std::stringstream s; + s << iv; + return ""; } ) .def("__str",