Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Sep 18, 2023
1 parent e95830c commit 9becd63
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/cudf/cudf/tests/test_multiindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -2009,3 +2009,12 @@ def test_multiindex_to_frame_allow_duplicates(
)

assert_eq(expected, actual)


def test_multiIndex_codes():
midx = cudf.MultiIndex.from_tuples(
[("a", "b"), ("a", "c"), ("b", "c")], names=["A", "Z"]
)

for p_array, g_array in zip(midx.to_pandas().codes, midx.codes):
assert_eq(p_array, g_array)

0 comments on commit 9becd63

Please sign in to comment.