diff --git a/python/src/bind_Cluster.hpp b/python/src/bind_Cluster.hpp index eca0881..7907cde 100644 --- a/python/src/bind_Cluster.hpp +++ b/python/src/bind_Cluster.hpp @@ -23,7 +23,7 @@ void define_Cluster(py::module &m, const std::string &typestr) { auto class_name = fmt::format("Cluster{}", typestr); py::class_>( - m, class_name.c_str(), py::buffer_protocol()) + m, class_name.c_str(), py::buffer_protocol(), py::module_local()) .def(py::init([](CoordType x, CoordType y, py::array_t data) { diff --git a/python/src/bind_ClusterVector.hpp b/python/src/bind_ClusterVector.hpp index 254f96a..d4cbc3f 100644 --- a/python/src/bind_ClusterVector.hpp +++ b/python/src/bind_ClusterVector.hpp @@ -31,7 +31,8 @@ void define_ClusterVector(py::module &m, const std::string &typestr) { py::class_, void>>( m, class_name.c_str(), - py::buffer_protocol()) + py::buffer_protocol(), + py::module_local()) .def(py::init()) // TODO change!!!