From f29e404449d91f5195098210b1a0aa7e26ce6077 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 5 Mar 2024 11:40:39 -1000 Subject: [PATCH] Replace cudf column.full with cudf.as_column (#1350) I have a PR in cudf removing `full` in favor of `as_column` which has equivalent functionality (https://github.com/rapidsai/cudf/pull/14698), so replacing the single usage I found here Authors: - Matthew Roeschke (https://github.com/mroeschke) - Bradley Dice (https://github.com/bdice) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Mark Harris (https://github.com/harrism) - GALI PREM SAGAR (https://github.com/galipremsagar) - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/cuspatial/pull/1350 --- .../cuspatial/cuspatial/core/binops/distance_dispatch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/cuspatial/cuspatial/core/binops/distance_dispatch.py b/python/cuspatial/cuspatial/core/binops/distance_dispatch.py index c19953107..db2e6339b 100644 --- a/python/cuspatial/cuspatial/core/binops/distance_dispatch.py +++ b/python/cuspatial/cuspatial/core/binops/distance_dispatch.py @@ -1,5 +1,5 @@ import cudf -from cudf.core.column import as_column, full +from cudf.core.column import as_column from cuspatial._lib.distance import ( pairwise_linestring_distance, @@ -185,10 +185,11 @@ def __call__(self): # Rows with misaligned indices contains nan. Here we scatter the # distance values to the correct indices. - result = full( - len(self._res_index), + result = as_column( float("nan"), + length=len(self._res_index), dtype="float64", + nan_as_null=False, ) scatter_map = as_column( range(len(self._res_index)), dtype="int32"