diff options
Diffstat (limited to 'src/python/gudhi/hera/bottleneck.cc')
-rw-r--r-- | src/python/gudhi/hera/bottleneck.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/python/gudhi/hera/bottleneck.cc b/src/python/gudhi/hera/bottleneck.cc index 0cb562ce..9826252c 100644 --- a/src/python/gudhi/hera/bottleneck.cc +++ b/src/python/gudhi/hera/bottleneck.cc @@ -16,13 +16,16 @@ using py::ssize_t; #endif -#include <bottleneck.h> // Hera +#include <hera/bottleneck.h> + +// Indices are added internally in bottleneck_distance, they are not needed in the input. +static auto make_point(double x, double y, py::ssize_t) { return std::pair(x, y); }; double bottleneck_distance(Dgm d1, Dgm d2, double delta) { - // I *think* the call to request() has to be before releasing the GIL. - auto diag1 = numpy_to_range_of_pairs(d1); - auto diag2 = numpy_to_range_of_pairs(d2); + // I *think* the call to request() in numpy_to_range_of_pairs has to be before releasing the GIL. + auto diag1 = numpy_to_range_of_pairs(d1, make_point); + auto diag2 = numpy_to_range_of_pairs(d2, make_point); py::gil_scoped_release release; |