From 125ad079fd4e07556b96e38b28c51807d349718c Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 26 May 2020 18:37:19 +0200 Subject: Move comment --- src/python/gudhi/clustering/_tomato.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/python/gudhi/clustering/_tomato.cc') 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 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> (ou py::isinstance 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 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> (ou py::isinstance 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 ? -- cgit v1.2.3