Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove dead code #2139

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/awkward/_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def normalise_item(item, backend: ak._backends.Backend):
return item.data

elif isinstance(item, ak.contents.RegularArray):
# Pure NumPy arrays without masks follow NumPy advanced indexing
# Pure NumPy arrays (without masks) follow NumPy advanced indexing
# If we can produce such a content, return the underlying NumPy array
# Otherwise, we probably have options or are not purelist_regular, etc.
# As such, we then follow Awkward indexing. This logic should follow
Expand All @@ -161,10 +161,8 @@ def normalise_item(item, backend: ak._backends.Backend):

if as_numpy is None:
out = normalise_item_bool_to_int(normalise_item_nested(item))
if isinstance(out, ak.contents.NumpyArray):
return out.data
else:
return out
assert not isinstance(out, ak.contents.NumpyArray)
return out
else:
return as_numpy.data

Expand Down