added ClusterFile tests fixed some bugs in ClusterFile
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m55s

This commit is contained in:
Mazzoleni Alice Francesca
2025-04-14 15:48:09 +02:00
parent 3f753ec900
commit 54def26334
9 changed files with 294 additions and 439 deletions

View File

@ -83,6 +83,17 @@ void define_cluster_vector(py::module &m, const std::string &typestr) {
self.push_back(cluster);
})
.def("sum",
[](ClusterVector<ClusterType> &self) {
auto *vec = new std::vector<Type>(self.sum());
return return_vector(vec);
})
.def("sum_2x2",
[](ClusterVector<ClusterType> &self) {
auto *vec = new std::vector<Type>(self.sum_2x2());
return return_vector(vec);
})
// implement push_back
.def_property_readonly("size", &ClusterVector<ClusterType>::size)
.def("item_size", &ClusterVector<ClusterType>::item_size)