diff --git a/python/cuspatial/cuspatial/core/binops/distance_dispatch.py b/python/cuspatial/cuspatial/core/binops/distance_dispatch.py index 8588b8db5..ea07863a8 100644 --- a/python/cuspatial/cuspatial/core/binops/distance_dispatch.py +++ b/python/cuspatial/cuspatial/core/binops/distance_dispatch.py @@ -186,9 +186,7 @@ def __call__(self): # Rows with misaligned indices contains nan. Here we scatter the # distance values to the correct indices. result = as_column( - float("nan"), - length=len(self._res_index), - dtype="float64", + [float("nan")] * len(self._res_index), dtype="float64" ) scatter_map = as_column( range(len(self._res_index)), dtype="int32"