Skip to content

Commit

Permalink
Merge branch 'master' into 3194-add-proto-tests-to-CI
Browse files Browse the repository at this point in the history
  • Loading branch information
stress-tess authored May 20, 2024
2 parents e69c339 + b435ed4 commit e35bc77
Show file tree
Hide file tree
Showing 23 changed files with 1,508 additions and 802 deletions.
7 changes: 7 additions & 0 deletions PROTO_tests/tests/categorical_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,10 @@ def test_lookup(self):
args = ak.array([3, 2, 1, 0])
ret = ak.lookup(keys, values, args)
assert ret.to_list() == ["C", "B", "A", "N/A"]

def test_sort(self):
rand_cats = ak.random_strings_uniform(1, 16, 10)
rand_codes = ak.randint(0, rand_cats.size, 100)
cat = ak.Categorical.from_codes(codes=rand_codes, categories=rand_cats)

assert sorted(cat.to_list()) == cat.sort_values().to_list()
Loading

0 comments on commit e35bc77

Please sign in to comment.