Skip to content

Commit

Permalink
Fix pytorch related pytest (#14198)
Browse files Browse the repository at this point in the history
Calling `cudf.Index([])` results in `str` dtype `Index`. This PR fixes an issue with a pytorch related pytest by explicitly passing a `float64` dtype.

xref: #14116

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - https://github.com/brandon-b-miller

URL: #14198
  • Loading branch information
galipremsagar authored Sep 26, 2023
1 parent 3196f6c commit a9ec350
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/tests/test_cuda_array_interface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
# Copyright (c) 2019-2023, NVIDIA CORPORATION.

import types
from contextlib import ExitStack as does_not_raise
Expand Down Expand Up @@ -193,7 +193,7 @@ def test_cuda_array_interface_pytorch():

assert_eq(got, cudf.Series(buffer, dtype=np.bool_))

index = cudf.Index([])
index = cudf.Index([], dtype="float64")
tensor = torch.tensor(index)
got = cudf.Index(tensor)
assert_eq(got, index)
Expand Down

0 comments on commit a9ec350

Please sign in to comment.