Skip to content

Commit

Permalink
Merge pull request rapidsai#14885 from rapidsai/branch-24.02
Browse files Browse the repository at this point in the history
Forward-merge branch-24.02 to branch-24.04
  • Loading branch information
GPUtester authored Jan 25, 2024
2 parents f14ba22 + 0cd58fb commit 7535cab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/_base_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,11 +1040,11 @@ def difference(self, other, sort=None):
res_name = _get_result_name(self.name, other.name)

if is_mixed_with_object_dtype(self, other):
difference = self.copy()
difference = self.copy().unique()
else:
other = other.copy(deep=False)
difference = cudf.core.index._index_from_data(
cudf.DataFrame._from_data({"None": self._column})
cudf.DataFrame._from_data({"None": self._column.unique()})
.merge(
cudf.DataFrame._from_data({"None": other._column}),
how="leftanti",
Expand Down
4 changes: 3 additions & 1 deletion python/cudf/cudf/tests/test_index.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
# Copyright (c) 2018-2024, NVIDIA CORPORATION.

"""
Test related to Index
Expand Down Expand Up @@ -803,6 +803,7 @@ def test_index_to_series(data):
pd.Series(["1", "2", "a", "3", None], dtype="category"),
range(0, 10),
[],
[1, 1, 2, 2],
],
)
@pytest.mark.parametrize(
Expand All @@ -819,6 +820,7 @@ def test_index_to_series(data):
range(2, 4),
pd.Series(["1", "a", "3", None], dtype="category"),
[],
[2],
],
)
@pytest.mark.parametrize("sort", [None, False])
Expand Down

0 comments on commit 7535cab

Please sign in to comment.