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

Indexing operations on regular array typetracer fails #2222

Closed
lgray opened this issue Feb 7, 2023 · 4 comments · Fixed by #2227
Closed

Indexing operations on regular array typetracer fails #2222

lgray opened this issue Feb 7, 2023 · 4 comments · Fixed by #2227
Assignees
Labels
bug The problem described is something that must be fixed

Comments

@lgray
Copy link
Contributor

lgray commented Feb 7, 2023

Version of Awkward Array

awkward@main + dask_awkward@refactor-column-optimization

Description and code to reproduce

import awkward as ak
import dask_awkward as dak

x = ak.to_regular(ak.Array([[[-1, 1.], [-2, 2], [-3, 3]], [[-4, 4]], []]), axis=-1)
dx = dak.from_awkward(x, 1)
dx._meta[:, -1]

results in:

Traceback (most recent call last):
  File "regular_array_problem.py", line 6, in <module>
    dx._meta[:, -1]
  File "/Users/lgray/coffea-dev/awkward/src/awkward/highlevel.py", line 951, in __getitem__
    out = self._layout[where]
  File "/Users/lgray/coffea-dev/awkward/src/awkward/contents/content.py", line 514, in __getitem__
    return self._getitem(where)
  File "/Users/lgray/coffea-dev/awkward/src/awkward/contents/content.py", line 551, in _getitem
    out = next._getitem_next(nextwhere[0], nextwhere[1:], None)
  File "/Users/lgray/coffea-dev/awkward/src/awkward/contents/regulararray.py", line 393, in _getitem_next
    start, stop, step = head.indices(self._size)
@lgray lgray added the bug (unverified) The problem described would be a bug, but needs to be triaged label Feb 7, 2023
@lgray lgray changed the title Indexing operations on regular arrays fail Indexing operations on regular array typetracer fails Feb 7, 2023
@lgray
Copy link
Contributor Author

lgray commented Feb 7, 2023

As a side note - this problem also appears in awkward 2.0.7 on PyPI as well.

@agoose77
Copy link
Collaborator

agoose77 commented Feb 7, 2023

Related to #2223

@lgray
Copy link
Contributor Author

lgray commented Feb 7, 2023

FYI with #2223 merged this error still occurs

@agoose77
Copy link
Collaborator

agoose77 commented Feb 7, 2023

Yes, that PR ended up being split into two parts for review. #2220 should be the one that starts to fix this.

@agoose77 agoose77 added bug The problem described is something that must be fixed and removed bug (unverified) The problem described would be a bug, but needs to be triaged labels Feb 8, 2023
@agoose77 agoose77 self-assigned this Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The problem described is something that must be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants