mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-31 04:31:29 +01:00
More uniform binding of Numpy arrays (#381)
- Introduce a standard way to bind numpy arrays: py::array_t<T> and .noconvert() on the argument - Take py::array_t by value since it's just a small wrapper - Update bindings
This commit is contained in:
1 parent
8579a140f7
commit
941325ea15
26 files changed
+597
-280
No files matched your search
@@ -46,8 +46,7 @@ void define_ClusterVector(py::module &m, const std::string &typestr) {
|
||||
|
||||
.def(
|
||||
"__call__",
|
||||
[](ClusterVector<ClusterType> &self,
|
||||
py::array_t<bool, py::array::c_style> mask) {
|
||||
[](ClusterVector<ClusterType> &self, py::array_t<bool> mask) {
|
||||
return self(make_view_1d(mask));
|
||||
},
|
||||
py::arg("mask").noconvert(), R"doc(
|
||||
|
||||
Reference in new issue
Block a user