From 534b267f0889e47d7abc3a09ae23bfc7b4a3ca39 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:39:53 -1000 Subject: [PATCH] Replace cudf _from_columns with a public API (#1326) This private API will be removed in 24.02 Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - Michael Wang (https://github.com/isVoid) - Mark Harris (https://github.com/harrism) URL: https://github.com/rapidsai/cuspatial/pull/1326 --- python/cuspatial/cuspatial/core/spatial/distance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/cuspatial/cuspatial/core/spatial/distance.py b/python/cuspatial/cuspatial/core/spatial/distance.py index 309e88e21..f9a0b1d6b 100644 --- a/python/cuspatial/cuspatial/core/spatial/distance.py +++ b/python/cuspatial/cuspatial/core/spatial/distance.py @@ -91,7 +91,9 @@ def directed_hausdorff_distance(multipoints: GeoSeries): as_column(multipoints.multipoints.geometry_offset[:-1]), ) - return DataFrame._from_columns(result, range(num_spaces)) + # the column label of each column in result should be its int position + # e.g. a dict of {0: result[0], 1, result[1], ...} + return DataFrame._from_data(dict(enumerate(result))) def haversine_distance(p1: GeoSeries, p2: GeoSeries):