This commit is contained in:
froejdh_e
2025-04-10 16:50:04 +02:00
parent 53a90e197e
commit 113f34cc98
6 changed files with 144 additions and 5 deletions

View File

@ -80,11 +80,12 @@ void define_cluster_vector(py::module &m, const std::string &typestr) {
self.push_back(cluster);
})
// implement push_back
.def_property_readonly("size", &ClusterVector<ClusterType>::size)
.def("item_size", &ClusterVector<ClusterType>::item_size)
.def_property_readonly("fmt",
[typestr]() { return fmt_format<ClusterType>; })
[typestr](ClusterVector<ClusterType> &self) { return fmt_format<ClusterType>; })
.def_property_readonly("cluster_size_x",
&ClusterVector<ClusterType>::cluster_size_x)