Skip to content

Commit

Permalink
Replace cudf _from_columns with a public API (#1326)
Browse files Browse the repository at this point in the history
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: #1326
  • Loading branch information
mroeschke authored Jan 23, 2024
1 parent 43bb8f3 commit 534b267
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/cuspatial/cuspatial/core/spatial/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 534b267

Please sign in to comment.