Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 13, 2022
1 parent 8368749 commit ce4af80
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/v2/test_1999-bug1406.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

to_list = ak._v2.operations.to_list


def test_1406issue():
array = ak._v2.Array(
ak._v2.contents.ListOffsetArray(
Expand All @@ -27,7 +28,7 @@ def test_1406issue():
ak._v2.index.Index64(np.array([0, 0, 1], dtype=np.int64)),
ak._v2.contents.NumpyArray(np.array([0], dtype=np.int64)),
),
)
),
),
check_valid=True,
)
Expand All @@ -44,8 +45,7 @@ def test_success_remove_option_type():
),
),
check_valid=True,
)

)

index = ak._v2.Array(
ak._v2.contents.ListOffsetArray(
Expand Down Expand Up @@ -83,13 +83,13 @@ def test_success_start_offset0():
ak._v2.index.Index64(np.array([0, 0, 1], dtype=np.int64)),
ak._v2.contents.NumpyArray(np.array([0], dtype=np.int64)),
),
)
),
),
check_valid=True,
)

assert to_list(array[index]) == [[[], [2]]]


def test_success_nonempty_list():
array = ak._v2.Array(
Expand All @@ -112,10 +112,9 @@ def test_success_nonempty_list():
ak._v2.index.Index64(np.array([0, 1, 2], dtype=np.int64)),
ak._v2.contents.NumpyArray(np.array([0, 0], dtype=np.int64)),
),
)
),
),
check_valid=True,
)

assert to_list(array[index]) == [[[0], [1]]]

0 comments on commit ce4af80

Please sign in to comment.