Skip to content

Commit

Permalink
Replace cudf column.full with cudf.as_column (#1350)
Browse files Browse the repository at this point in the history
I have a PR in cudf removing `full` in favor of `as_column` which has equivalent functionality (rapidsai/cudf#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: #1350
  • Loading branch information
mroeschke authored Mar 5, 2024
1 parent 54f0430 commit f29e404
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/cuspatial/cuspatial/core/binops/distance_dispatch.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit f29e404

Please sign in to comment.