diff --git a/libsrc/core/python_ngcore.hpp b/libsrc/core/python_ngcore.hpp index 79c91885..f333071b 100644 --- a/libsrc/core/python_ngcore.hpp +++ b/libsrc/core/python_ngcore.hpp @@ -286,6 +286,15 @@ namespace ngcore return arr; } + template + py::object makePyTuple (FlatArray ar) + { + py::tuple res(ar.Size()); + for (auto i : Range(ar)) + res[i] = py::cast(ar[i]); + return res; + } + template ::index_type> void ExportArray (py::module &m) {