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 Apr 26, 2022
1 parent 18076ee commit 3994511
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/awkward/_v2/operations/structure/ak_firsts.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ def _impl(array, axis, highlevel, behavior):
out = layout[0]
else:
if posaxis < 0:
raise ak._v2._util.error(NotImplementedError(
"ak.firsts with ambiguous negative axis"

))
raise ak._v2._util.error(
NotImplementedError("ak.firsts with ambiguous negative axis")
)
toslice = (slice(None, None, None),) * posaxis + (0,)
out = ak._v2.operations.structure.mask(layout, ak._v2.operations.structure.num(layout, axis=posaxis) > 0, highlevel=False)[
toslice
]
out = ak._v2.operations.structure.mask(
layout,
ak._v2.operations.structure.num(layout, axis=posaxis) > 0,
highlevel=False,
)[toslice]

return ak._v2._util.wrap(out, behavior, highlevel)

0 comments on commit 3994511

Please sign in to comment.