Skip to content

Commit

Permalink
test: ensure bytemaskedarray works!
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Feb 19, 2024
1 parent 08bebfe commit 668ecbb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_unproject_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ def test_BitMaskedArray():
compare_values(projected, unprojected)

form = ak.forms.BitMaskedForm('u8', ak.forms.NumpyForm('int64'), valid_when=True, lsb_order=True)
unprojected = unproject_layout(form, projected)
compare_values(projected, unprojected)

def test_ByteMaskedArray():
form = ak.forms.ByteMaskedForm('u8', ak.forms.NumpyForm('int64'), valid_when=False)
projected = ak.contents.UnmaskedArray(ak.from_iter([1, 2, 3, 4], highlevel=False))
unprojected = unproject_layout(form, projected)
compare_values(projected, unprojected)

form = ak.forms.ByteMaskedForm('u8', ak.forms.NumpyForm('int64'), valid_when=True)
unprojected = unproject_layout(form, projected)
compare_values(projected, unprojected)

0 comments on commit 668ecbb

Please sign in to comment.