diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-05-26 18:37:19 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-05-26 18:37:19 +0200 |
commit | 125ad079fd4e07556b96e38b28c51807d349718c (patch) | |
tree | deecf249e5d6401504714973a8209928a7d35a30 /src | |
parent | cf617a8bf5b9701dad69b1d47b449654ab32453c (diff) |
Move comment
Diffstat (limited to 'src')
-rw-r--r-- | src/python/gudhi/clustering/_tomato.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/python/gudhi/clustering/_tomato.cc b/src/python/gudhi/clustering/_tomato.cc index f2e73ed6..cd382d57 100644 --- a/src/python/gudhi/clustering/_tomato.cc +++ b/src/python/gudhi/clustering/_tomato.cc @@ -252,7 +252,10 @@ auto merge(py::array_t<Cluster_index, py::array::c_style> children, Cluster_inde return py::array(ret.size(), ret.data()); } -// Do a special version when ngb is a numpy array, where we can cast to int[k][n] ? +// TODO: Do a special version when ngb is a numpy array, where we can cast to int[k][n] ? +// py::isinstance<py::array_t<std::int32_t>> (ou py::isinstance<py::array> et tester dtype) et flags&c_style +// ou overload (en virant forcecast?) +// aussi le faire au cas où on n'aurait pas un tableau, mais où chaque liste de voisins serait un tableau ? auto plouf(py::handle ngb, py::array_t<double, py::array::c_style | py::array::forcecast> density) { // used to be py::iterable ngb, but that's inconvenient if it doesn't come pre-sorted // use py::handle and check if [] (aka __getitem__) works? But then we need to build an object to pass it to [] @@ -306,9 +309,3 @@ PYBIND11_MODULE(_tomato, m) { // m.def("doit2", &plaf, "does the clustering faster"); m.def("merge", &merge, "merge clusters"); } - -// https://github.com/pybind/pybind11/issues/1042 pour convertir vector en numpy array -// -// py::isinstance<py::array_t<std::int32_t>> (ou py::isinstance<py::array> et tester dtype) et flags&c_style -// ou overload (en virant forcecast?) -// aussi le faire au cas où on n'aurait pas un tableau, mais où chaque liste de voisins serait un tableau ? |