Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace cudf column.full with cudf.as_column #1350

Merged
merged 7 commits into from
Mar 5, 2024
8 changes: 3 additions & 5 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,8 @@ 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),
float("nan"),
dtype="float64",
result = as_column(
[float("nan")] * len(self._res_index), dtype="float64", nan_as_null=False
)
bdice marked this conversation as resolved.
Show resolved Hide resolved
scatter_map = as_column(
range(len(self._res_index)), dtype="int32"
Expand Down
Loading