Skip to content

Commit

Permalink
test: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jul 16, 2023
1 parent 14c1e5f commit b160097
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_2582-merge-option-non-option.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE

import numpy as np # noqa: F401
import pytest # noqa: F401

import awkward as ak # noqa: F401


def test_merge_option():
x = ak.layout.IndexedArray64(
ak.layout.Index64([0, 1]), ak.layout.NumpyArray([1, 2, 3])
)
y = ak.layout.IndexedOptionArray64(
ak.layout.Index64([0, 1, -1]), ak.layout.NumpyArray([1, 2, 3])
)

assert isinstance(ak.concatenate((y, x)).layout, ak.layout.IndexedOptionArray64)

0 comments on commit b160097

Please sign in to comment.