From b2cfb9c88db13228a94628970c4c8c01a5527d56 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Wed, 27 Nov 2024 11:29:03 +0000 Subject: [PATCH] Fix typo bug in Index._intersection I think this was always supposed to be checking for set membership, not equality. --- python/cudf/cudf/core/_base_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cudf/cudf/core/_base_index.py b/python/cudf/cudf/core/_base_index.py index a6abd63d042..dfa3ef0df92 100644 --- a/python/cudf/cudf/core/_base_index.py +++ b/python/cudf/cudf/core/_base_index.py @@ -1473,7 +1473,7 @@ def _intersection(self, other, sort=None): ._data ) - if sort is {None, True} and len(other): + if sort in {None, True} and len(other): return intersection_result.sort_values() return intersection_result